diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-26 22:39:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-26 22:39:24 +0200 |
commit | bade44e5cad1b08c85d4a8ba08d94a30458dddfb (patch) | |
tree | 758f453eb1dc06f23a248f936e19dce249f1b6e8 /src/evalfunc.c | |
parent | 3697c9bbae755831d3cf2f11179aaff29e343f51 (diff) | |
download | vim-git-bade44e5cad1b08c85d4a8ba08d94a30458dddfb.tar.gz |
patch 8.2.1751: using 2 where bool is expected may throw an errorv8.2.1751
Problem: Using 2 where bool is expected may throw an error.
Solution: Make this backwards compatible.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index afc897753..b387c8ccc 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -1982,7 +1982,7 @@ f_deepcopy(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_UNKNOWN) noref = (int)tv_get_bool_chk(&argvars[1], NULL); if (noref < 0 || noref > 1) - emsg(_(e_invarg)); + semsg(_(e_using_number_as_bool_nr), noref); else { copyID = get_copyID(); @@ -8193,7 +8193,7 @@ f_strchars(typval_T *argvars, typval_T *rettv) if (argvars[1].v_type != VAR_UNKNOWN) skipcc = (int)tv_get_bool(&argvars[1]); if (skipcc < 0 || skipcc > 1) - emsg(_(e_invarg)); + semsg(_(e_using_number_as_bool_nr), skipcc); else { func_mb_ptr2char_adv = skipcc ? mb_ptr2char_adv : mb_cptr2char_adv; |