Skip to content

Commit 2b59df0

Browse files
committed
patch 8.2.3201: crash in test
Problem: Crash in test. Solution: Initialize "where".
1 parent 7a3fe3e commit 2b59df0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/eval.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3368,9 +3368,8 @@ eval7t(
33683368
}
33693369
else
33703370
{
3371-
where_T where;
3371+
where_T where = WHERE_INIT;
33723372

3373-
where.wt_index = 0;
33743373
where.wt_variable = TRUE;
33753374
res = check_type(want_type, actual, TRUE, where);
33763375
}

src/evalvars.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,7 @@ set_var_const(
32503250
{
32513251
scriptitem_T *si = SCRIPT_ITEM(import->imp_sid);
32523252
svar_T *sv;
3253-
where_T where;
3253+
where_T where = WHERE_INIT;
32543254

32553255
// imported variable from another script
32563256
if ((flags & ASSIGN_NO_DECL) == 0)
@@ -3260,7 +3260,6 @@ set_var_const(
32603260
}
32613261
sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
32623262

3263-
where.wt_index = 0;
32643263
where.wt_variable = TRUE;
32653264
if (check_typval_type(sv->sv_type, tv, where) == FAIL
32663265
|| value_check_lock(sv->sv_tv->v_lock, name, FALSE))
@@ -3314,7 +3313,7 @@ set_var_const(
33143313

33153314
if (var_in_vim9script)
33163315
{
3317-
where_T where;
3316+
where_T where = WHERE_INIT;
33183317

33193318
// check the type and adjust to bool if needed
33203319
where.wt_index = var_idx;

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3201,
758760
/**/
759761
3200,
760762
/**/

0 commit comments

Comments
 (0)