From: Richard M. Stallman Date: Tue, 29 Apr 1997 00:51:47 +0000 (+0000) Subject: (Fexpand_file_name): Check length > 0 when necessary. X-Git-Tag: emacs-20.1~2353 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15fc2f8c1ff669907dae2ecc6a741b79a0b39ad7;p=emacs.git (Fexpand_file_name): Check length > 0 when necessary. --- diff --git a/src/fileio.c b/src/fileio.c index a05dbd5f221..6560f28bb70 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1251,7 +1251,7 @@ See also the function `substitute-in-file-name'.") /* Get rid of any slash at the end of newdir, unless newdir is just // (an incomplete UNC name). */ length = strlen (newdir); - if (IS_DIRECTORY_SEP (newdir[length - 1]) + if (length > 0 && IS_DIRECTORY_SEP (newdir[length - 1]) #ifdef WINDOWSNT && !(length == 2 && IS_DIRECTORY_SEP (newdir[0])) #endif