Skip to content

Commit a974953

Browse files
committed
patch 8.2.2573: Vim9: using inalid pointer for error message
Problem: Vim9: using inalid pointer for error message. Solution: Use the right pointer. (closes #7921)
1 parent 18062fc commit a974953

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/eval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,7 @@ eval6(
31303130
*/
31313131
if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[1]))
31323132
{
3133-
error_white_both(p, 1);
3133+
error_white_both(*arg, 1);
31343134
clear_tv(rettv);
31353135
return FAIL;
31363136
}

src/testdir/test_vim9_expr.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,17 @@ def Test_expr5_vim9script()
12541254
echo 'a' .. function('len')
12551255
END
12561256
CheckScriptFailure(lines, 'E729:', 2)
1257+
1258+
lines =<< trim END
1259+
vim9script
1260+
new
1261+
['']->setline(1)
1262+
/pattern
1263+
1264+
eval 0
1265+
bwipe!
1266+
END
1267+
CheckScriptFailure(lines, "E1004: White space required before and after '/' at \"/pattern")
12571268
enddef
12581269

12591270
def Test_expr5_vim9script_channel()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2573,
753755
/**/
754756
2572,
755757
/**/

0 commit comments

Comments
 (0)