# HG changeset patch # User Richard M. Stallman # Date 862275107 0 # Node ID 6a190274d2e71dccf2421d524ddba4b280482886 # Parent b2c8fb8139c8ec4900c68325610f93ed1ba45d6d (Fexpand_file_name): Check length > 0 when necessary. diff -r b2c8fb8139c8 -r 6a190274d2e7 src/fileio.c --- a/src/fileio.c Tue Apr 29 00:23:40 1997 +0000 +++ b/src/fileio.c Tue Apr 29 00:51:47 1997 +0000 @@ -1251,7 +1251,7 @@ /* 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