]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fexpand_file_name): Check length > 0 when necessary.
authorRichard M. Stallman <rms@gnu.org>
Tue, 29 Apr 1997 00:51:47 +0000 (00:51 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 29 Apr 1997 00:51:47 +0000 (00:51 +0000)
src/fileio.c

index a05dbd5f22194859164f810875196a96a7de1fb0..6560f28bb70c29fadf9ecc506f00df945bdb776d 100644 (file)
@@ -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