[map] Make initial resize actually work
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 30 May 2018 00:27:25 +0000 (17:27 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 30 May 2018 00:27:25 +0000 (17:27 -0700)
src/hb-map-private.hh

index 64bcffc..d0909b5 100644 (file)
@@ -123,7 +123,7 @@ struct hb_map_t
   {
     if (unlikely (in_error)) return;
     if (unlikely (key == INVALID)) return;
-    if ((occupancy + occupancy / 2) > mask && !resize ()) return;
+    if ((occupancy + occupancy / 2) >= mask && !resize ()) return;
     unsigned int i = bucket_for (key);
 
     if (value == INVALID && items[i].key != key)