From 1c1a98e872ad09b12fe2085031f0045f993ca5f0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 10 May 2010 15:23:45 -0300 Subject: corrected some places where an old object could end up in front of a new one + minimal documentation about this problem --- lstring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lstring.c') diff --git a/lstring.c b/lstring.c index dcc40fdd..4144cb18 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $ +** $Id: lstring.c,v 2.17 2010/04/03 20:24:18 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -37,6 +37,7 @@ void luaS_resize (lua_State *L, int newsize) { unsigned int h = lmod(gco2ts(p)->hash, newsize); /* new position */ gch(p)->next = tb->hash[h]; /* chain it */ tb->hash[h] = p; + resetoldbit(p); /* see MOVE OLD rule */ p = next; } } -- cgit v1.2.3-55-g6feb