diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index 05cc4677b64..6c74dccc2ee 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* File IO for GNU Emacs. | 1 | /* File IO for GNU Emacs. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -847,7 +847,7 @@ See also the function `substitute-in-file-name'.") | |||
| 847 | { | 847 | { |
| 848 | /* Get rid of any slash at the end of newdir. */ | 848 | /* Get rid of any slash at the end of newdir. */ |
| 849 | int length = strlen (newdir); | 849 | int length = strlen (newdir); |
| 850 | if (newdir[length - 1] == '/') | 850 | if (length > 1 && newdir[length - 1] == '/') |
| 851 | { | 851 | { |
| 852 | unsigned char *temp = (unsigned char *) alloca (length); | 852 | unsigned char *temp = (unsigned char *) alloca (length); |
| 853 | bcopy (newdir, temp, length - 1); | 853 | bcopy (newdir, temp, length - 1); |