# HG changeset patch # User Bram Moolenaar # Date 1672060503 -3600 # Node ID a5959e14771a06867f899567a8feb499252227d3 # Parent 95575ff77799c1c68065be4d1d436bb0184c8e58 patch 9.0.1099: trying to resize a hashtab may cause a problem Commit: https://github.com/vim/vim/commit/81b7ecc5cb78cad901a9a85e46ecba109cc6ee7d Author: Bram Moolenaar Date: Mon Dec 26 13:08:06 2022 +0000 patch 9.0.1099: trying to resize a hashtab may cause a problem Problem: Trying to resize a hashtab may cause a problem. Solution: Do not try to resize a hashtab before adding an item. diff --git a/src/hashtab.c b/src/hashtab.c --- a/src/hashtab.c +++ b/src/hashtab.c @@ -249,7 +249,7 @@ hash_add_item( hash_T hash) { // If resizing failed before and it fails again we can't add an item. - if ((ht->ht_flags & HTFLAGS_ERROR) && hash_may_resize(ht, 0) == FAIL) + if (ht->ht_flags & HTFLAGS_ERROR) return FAIL; ++ht->ht_used; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1099, +/**/ 1098, /**/ 1097,