Mercurial > emacs
comparison src/fileio.c @ 17592:6a190274d2e7
(Fexpand_file_name): Check length > 0 when necessary.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 29 Apr 1997 00:51:47 +0000 |
parents | 331ce9fbf08b |
children | ad3a8768539a |
comparison
equal
deleted
inserted
replaced
17591:b2c8fb8139c8 | 17592:6a190274d2e7 |
---|---|
1249 if (newdir) | 1249 if (newdir) |
1250 { | 1250 { |
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 |
1258 ) | 1258 ) |
1259 { | 1259 { |