0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.2417: condition stack values may be used when not set

Problem:    Condition stack values may be used when not set.
Solution:   Clear cs_script_var_len and cs_block_id just in case they get used
            later. (issue #7733)
This commit is contained in:
Bram Moolenaar
2021-01-27 21:37:13 +01:00
parent bed72df3e6
commit 3e492c2d5f
2 changed files with 9 additions and 0 deletions

View File

@@ -920,6 +920,13 @@ enter_block(cstack_T *cstack)
cstack->cs_block_id[cstack->cs_idx] = ++si->sn_last_block_id;
si->sn_current_block_id = si->sn_last_block_id;
}
else
{
// Just in case in_vim9script() does not return the same value when the
// block ends.
cstack->cs_script_var_len[cstack->cs_idx] = 0;
cstack->cs_block_id[cstack->cs_idx] = 0;
}
}
static void