fix an off-by-one in the match array length

This commit is contained in:
Timothy Stack 2014-03-12 20:02:59 -07:00
parent 54d979f44f
commit f9adcc34b1

View File

@ -375,7 +375,7 @@ void readline_curses::store_matches(
int rc; int rc;
max_len = 0; max_len = 0;
for (int lpc = 0; lpc < num_matches; lpc++) { for (int lpc = 0; lpc <= num_matches; lpc++) {
max_len = max(max_len, (int)strlen(matches[lpc])); max_len = max(max_len, (int)strlen(matches[lpc]));
} }