diff --git a/ChangeLog b/ChangeLog index 57078695795490f79812db8974952b5b4374b434..4f65f083e4c189052d33272c477efb0706d4d867 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,9 +8,6 @@ CVS code - - Since the field precision operator used in the sprintf() uses ints and not size_t's, replace it with two strncpy()s, which use size_t's. (DLR) - - If the tab-completed path is a directory, make sure enough - space is allocated before tacking a slash onto the end of it. - (DLR) - help.c: parse_help_input() - Add 'E' and 'e' as aliases for Exit, for consistency with the diff --git a/src/files.c b/src/files.c index bfc11ad7730d896369d6152df3ea53d175a2ef51..99f862e7a58bd85b4f75544f142c2f625f65487e 100644 --- a/src/files.c +++ b/src/files.c @@ -2249,10 +2249,7 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool assert(common_len >= *place); if (num_matches == 1 && is_dir(mzero)) { - common_len++; - mzero = charealloc(mzero, common_len + 1); - mzero[common_len - 1] = '/'; - mzero[common_len] = '\0'; + mzero[common_len++] = '/'; assert(common_len > *place); }