mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
get_maphash: fix off-by-one
Patch-by: oni-link <knil.ino@gmail.com> ref: https://github.com/neovim/neovim/pull/6236#discussion_r195113807
This commit is contained in:
parent
c46997aa87
commit
c990d65c37
@ -4249,7 +4249,7 @@ static bool typebuf_match_len(const uint8_t *str, int *mlen)
|
||||
mapblock_T *get_maphash(int index, buf_T *buf)
|
||||
FUNC_ATTR_PURE
|
||||
{
|
||||
if (index > MAX_MAPHASH) {
|
||||
if (index >= MAX_MAPHASH) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user