From e2498e079e4636217e89f0b28844c4b5df4f8793 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 5 Jan 2005 16:20:51 -0200 Subject: change in hash algorithm so that it does not need empty slot (tables can be 100% full) --- lparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index d131e5e0..cb348c40 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.11 2004/12/07 18:31:16 roberto Exp $ +** $Id: lparser.c,v 2.12 2005/01/04 15:55:12 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -547,7 +547,7 @@ static void constructor (LexState *ls, expdesc *t) { check_match(ls, '}', '{', line); lastlistfield(fs, &cc); SETARG_B(fs->f->code[pc], luaO_int2fb(cc.na)); /* set initial array size */ - SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh+1)); /* set initial table size */ + SETARG_C(fs->f->code[pc], luaO_int2fb(cc.nh)); /* set initial table size */ } /* }====================================================================== */ -- cgit v1.2.3-55-g6feb