diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 445b6b91c..a51225d56 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12044,6 +12044,7 @@ filter_map_one(typval_T *tv, typval_T *expr, int map, int *remp) { typval_T rettv; typval_T argv[3]; + char_u buf[NUMBUFLEN]; char_u *s; int retval = FAIL; int dummy; @@ -12051,9 +12052,9 @@ filter_map_one(typval_T *tv, typval_T *expr, int map, int *remp) copy_tv(tv, &vimvars[VV_VAL].vv_tv); argv[0] = vimvars[VV_KEY].vv_tv; argv[1] = vimvars[VV_VAL].vv_tv; - s = expr->vval.v_string; if (expr->v_type == VAR_FUNC) { + s = expr->vval.v_string; if (call_func(s, (int)STRLEN(s), &rettv, 2, argv, 0L, 0L, &dummy, TRUE, NULL, NULL) == FAIL) goto theend; @@ -12070,6 +12071,9 @@ filter_map_one(typval_T *tv, typval_T *expr, int map, int *remp) } else { + s = get_tv_string_buf_chk(expr, buf); + if (s == NULL) + goto theend; s = skipwhite(s); if (eval1(&s, &rettv, TRUE) == FAIL) goto theend; |