1
0
forked from aniani/vim

patch 8.2.3411: Vim9: crash when using base name of import

Problem:    Vim9: crash when using base name of import. (Naohiro Ono)
Solution:   Check the import flags. (closes #8843)
This commit is contained in:
Bram Moolenaar
2021-09-07 22:12:19 +02:00
parent 89a54b413a
commit 6853c38b78
4 changed files with 25 additions and 0 deletions

View File

@@ -3260,6 +3260,12 @@ set_var_const(
semsg(_(e_redefining_imported_item_str), name);
goto failed;
}
if (import->imp_flags & IMP_FLAGS_STAR)
{
semsg(_(e_cannot_use_str_itself_it_is_imported_with_star),
name);
goto failed;
}
sv = ((svar_T *)si->sn_var_vals.ga_data) + import->imp_var_vals_idx;
where.wt_variable = TRUE;