From c990d65c37ded9ad9f4002a6eb6ec36aa29b4fe3 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 14 Jun 2018 18:51:35 +0200 Subject: get_maphash: fix off-by-one Patch-by: oni-link ref: https://github.com/neovim/neovim/pull/6236#discussion_r195113807 --- src/nvim/getchar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 690a83af50..1c0464b575 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -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; } -- cgit