summaryrefslogtreecommitdiff
path: root/src/dict.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dict.c')
-rw-r--r--src/dict.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dict.c b/src/dict.c
index 5581a5571..051ba2f6e 100644
--- a/src/dict.c
+++ b/src/dict.c
@@ -951,6 +951,11 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
}
if (evaluate)
{
+ if (vim9script && check_for_string(&tvkey) == FAIL)
+ {
+ clear_tv(&tvkey);
+ goto failret;
+ }
key = tv_get_string_buf_chk(&tvkey, buf);
if (key == NULL)
{