aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-04-29 00:51:47 +0000
committerRichard M. Stallman1997-04-29 00:51:47 +0000
commit15fc2f8c1ff669907dae2ecc6a741b79a0b39ad7 (patch)
treec8abdf7304d7e80fe27e5cf66db0f59586d19a4b /src
parentfcb242c9782949710ced3360b7a83e3ce5a1f69c (diff)
downloademacs-15fc2f8c1ff669907dae2ecc6a741b79a0b39ad7.tar.gz
emacs-15fc2f8c1ff669907dae2ecc6a741b79a0b39ad7.zip
(Fexpand_file_name): Check length > 0 when necessary.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
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'.")
1251 /* Get rid of any slash at the end of newdir, unless newdir is 1251 /* Get rid of any slash at the end of newdir, unless newdir is
1252 just // (an incomplete UNC name). */ 1252 just // (an incomplete UNC name). */
1253 length = strlen (newdir); 1253 length = strlen (newdir);
1254 if (IS_DIRECTORY_SEP (newdir[length - 1]) 1254 if (length > 0 && IS_DIRECTORY_SEP (newdir[length - 1])
1255#ifdef WINDOWSNT 1255#ifdef WINDOWSNT
1256 && !(length == 2 && IS_DIRECTORY_SEP (newdir[0])) 1256 && !(length == 2 && IS_DIRECTORY_SEP (newdir[0]))
1257#endif 1257#endif