mirror of
https://github.com/troglobit/editline.git
synced 2025-07-06 17:21:12 +08:00
Attempt to work around slightly bogus Coverity warnings.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
9fbad9dbff
commit
7abfadd7e6
@ -1701,7 +1701,7 @@ static el_status_t el_bind_key_in_map(int key, el_keymap_func_t function, el_key
|
||||
|
||||
/* Must check that pos is not the next to last array position,
|
||||
* otherwise we will write out-of-bounds to terminate the list. */
|
||||
if (pos >= mapsz - 1) {
|
||||
if (pos + 1 >= mapsz) {
|
||||
errno = ENOMEM;
|
||||
return CSeof;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user