mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user