In rehashtab, do counthash before adding asize
Thanks alug!
This commit is contained in:
1 parent
3162930634
commit
3cc8f8650d
1 file changed
+3
-1
@@ -363,7 +363,9 @@ static void rehashtab(lua_State *L, GCtab *t, cTValue *ek)
|
||||
total = 1 + asize;
|
||||
total += counthash(t, bins, &asize);
|
||||
#else
|
||||
total = 1 + asize + counthash(t, bins, &asize);
|
||||
/* more closely matches vanilla lua when abusing undefined behavior (frictionfix.....) */
|
||||
total = counthash(t, bins, &asize);
|
||||
total += 1 + asize;
|
||||
#endif
|
||||
asize += countint(ek, bins);
|
||||
na = bestasize(bins, &asize);
|
||||
|
||||
Reference in new issue
Block a user