1
0
forked from aniani/vim

patch 8.2.1207: Vim9: crash in expr test when run in the GUI

Problem:    Vim9: crash in expr test when run in the GUI.
Solution:   Break out of loop over hashtab also when function got removed and
            added.
This commit is contained in:
Bram Moolenaar
2020-07-14 15:01:05 +02:00
parent 1bce831e13
commit 7ce85be63b
3 changed files with 10 additions and 10 deletions

View File

@@ -3444,8 +3444,8 @@ ex_function(exarg_T *eap)
void
ex_defcompile(exarg_T *eap UNUSED)
{
long_u ht_used = func_hashtab.ht_used;
int todo = (int)ht_used;
long todo = (long)func_hashtab.ht_used;
int changed = func_hashtab.ht_changed;
hashitem_T *hi;
ufunc_T *ufunc;
@@ -3460,12 +3460,12 @@ ex_defcompile(exarg_T *eap UNUSED)
{
compile_def_function(ufunc, FALSE, NULL);
if (func_hashtab.ht_used != ht_used)
if (func_hashtab.ht_changed != changed)
{
// another function has been defined, need to start over
// a function has been added or removed, need to start over
todo = (long)func_hashtab.ht_used;
changed = func_hashtab.ht_changed;
hi = func_hashtab.ht_array;
ht_used = func_hashtab.ht_used;
todo = (int)ht_used;
--hi;
}
}