From 3344cffe7bf77c984550c01f9405f4d757150d8a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 13 Sep 2019 18:15:09 -0700 Subject: getdigits: introduce `strict`, `def` parameters Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555 --- src/nvim/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/menu.c') diff --git a/src/nvim/menu.c b/src/nvim/menu.c index 181efbf3b0..a23dbb1701 100644 --- a/src/nvim/menu.c +++ b/src/nvim/menu.c @@ -113,7 +113,7 @@ ex_menu(exarg_T *eap) } if (ascii_iswhite(*p)) { for (i = 0; i < MENUDEPTH && !ascii_iswhite(*arg); ++i) { - pri_tab[i] = getdigits_long(&arg); + pri_tab[i] = getdigits_long(&arg, false, 0); if (pri_tab[i] == 0) pri_tab[i] = 500; if (*arg == '.') -- cgit