diff src/evalfunc.c @ 22101:0ee66f232839 v8.2.1600

patch 8.2.1600: Vim9: cannot use "true" with deepcopy() Commit: https://github.com/vim/vim/commit/44b4a246b62e0622550b963bcf3034dce3bcfc0c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 5 17:18:28 2020 +0200 patch 8.2.1600: Vim9: cannot use "true" with deepcopy() Problem: Vim9: cannot use "true" with deepcopy(). Solution: Use tv_get_bool_chk(). (closes https://github.com/vim/vim/issues/6867)
author Bram Moolenaar <Bram@vim.org>
date Sat, 05 Sep 2020 17:30:03 +0200
parents 79dd6062d15c
children 0825ae9948f7
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1975,7 +1975,7 @@ f_deepcopy(typval_T *argvars, typval_T *
     int		copyID;
 
     if (argvars[1].v_type != VAR_UNKNOWN)
-	noref = (int)tv_get_number_chk(&argvars[1], NULL);
+	noref = (int)tv_get_bool_chk(&argvars[1], NULL);
     if (noref < 0 || noref > 1)
 	emsg(_(e_invarg));
     else