]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.3201: crash in test v8.2.3201
authorBram Moolenaar <Bram@vim.org>
Thu, 22 Jul 2021 13:14:25 +0000 (15:14 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 22 Jul 2021 13:14:25 +0000 (15:14 +0200)
Problem:    Crash in test.
Solution:   Initialize "where".

src/eval.c
src/evalvars.c
src/version.c

index bfe9f613611f45589470ce3d7cb9894d336a4493..fdee0089b3cd5534a7b7438616ee919b2b9df745 100644 (file)
@@ -3368,9 +3368,8 @@ eval7t(
                }
                else
                {
-                   where_T where;
+                   where_T where = WHERE_INIT;
 
-                   where.wt_index = 0;
                    where.wt_variable = TRUE;
                    res = check_type(want_type, actual, TRUE, where);
                }
index c58f73491a5ce2681a4d8c4768f6c83e47875a4a..f73efd3dbddc619f75af08f156b62c59cf49f101 100644 (file)
@@ -3250,7 +3250,7 @@ set_var_const(
        {
            scriptitem_T    *si = SCRIPT_ITEM(import->imp_sid);
            svar_T          *sv;
-           where_T         where;
+           where_T         where = WHERE_INIT;
 
            // imported variable from another script
            if ((flags & ASSIGN_NO_DECL) == 0)
@@ -3260,7 +3260,6 @@ set_var_const(
            }
            sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
 
-           where.wt_index = 0;
            where.wt_variable = TRUE;
            if (check_typval_type(sv->sv_type, tv, where) == FAIL
                    || value_check_lock(sv->sv_tv->v_lock, name, FALSE))
@@ -3314,7 +3313,7 @@ set_var_const(
 
                if (var_in_vim9script)
                {
-                   where_T where;
+                   where_T where = WHERE_INIT;
 
                    // check the type and adjust to bool if needed
                    where.wt_index = var_idx;
index 02469ed60793f256f51297219b005ca7dee650e8..8d726e400bab11dfbc0166502c36289d77ca9ccf 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3201,
 /**/
     3200,
 /**/