From ad843f1723121474cc6c3ab4e6542dd49c2d8cca Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 31 Mar 2018 14:14:33 +0200 Subject: [PATCH] Bug fix: Long Joliet names without dot were mangled with one character too many --- libisofs/joliet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libisofs/joliet.c b/libisofs/joliet.c index a49ec8d..b427b2e 100644 --- a/libisofs/joliet.c +++ b/libisofs/joliet.c @@ -1,7 +1,7 @@ /* * Copyright (c) 2007 Vreixo Formoso * Copyright (c) 2007 Mario Danic - * Copyright (c) 2011-2014 Thomas Schmitt + * Copyright (c) 2011-2018 Thomas Schmitt * * This file is part of the libisofs project; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 @@ -508,10 +508,10 @@ int mangle_single_dir(Ecma119Image *t, JolietNode *dir) } else { /* Directory, or file without extension */ if (children[i]->type == JOLIET_DIR) { - max = maxchar + 1 - digits; + max = maxchar - digits; dot = NULL; /* dots have no meaning in dirs */ } else { - max = maxchar + 1 - digits; + max = maxchar - digits; } name = full_name; if ((size_t) max < ucslen(name)) {