diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-15 18:00:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-15 18:00:19 +0200 |
commit | e40d75f6ef73095286b66e546c70ff6f045e009d (patch) | |
tree | 81c60d7c7643a4a13db5a3d28313597e8a1dec7c | |
parent | 73a733e08bb7853d2ac12c60756ae51e39abb4d9 (diff) | |
download | vim-git-e40d75f6ef73095286b66e546c70ff6f045e009d.tar.gz |
patch 7.4.1831v7.4.1831
Problem: When timer_stop() is called with a string there is no proper error
message.
Solution: Require getting a number. (Bjorn Linse)
-rw-r--r-- | src/eval.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 83bac7243..005485dd9 100644 --- a/src/eval.c +++ b/src/eval.c @@ -20733,8 +20733,14 @@ f_timer_start(typval_T *argvars, typval_T *rettv) static void f_timer_stop(typval_T *argvars, typval_T *rettv UNUSED) { - timer_T *timer = find_timer(get_tv_number(&argvars[0])); + timer_T *timer; + if (argvars[0].v_type != VAR_NUMBER) + { + EMSG(_(e_number_exp)); + return; + } + timer = find_timer(get_tv_number(&argvars[0])); if (timer != NULL) stop_timer(timer); } diff --git a/src/version.c b/src/version.c index caf1e46ff..e1297c819 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1831, +/**/ 1830, /**/ 1829, |