mirror of
https://github.com/tstack/lnav
synced 2024-11-01 21:40:34 +00:00
fix an off-by-one in the match array length
This commit is contained in:
parent
54d979f44f
commit
f9adcc34b1
@ -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]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user