From 12d9731a49530c4190142da3621f8508a629ca88 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 5 May 1997 17:21:23 -0300 Subject: bug: string table must be initialized. --- tree.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tree.c b/tree.c index 30e4d07c..0141a99c 100644 --- a/tree.c +++ b/tree.c @@ -3,7 +3,7 @@ ** TecCGraf - PUC-Rio */ -char *rcs_tree="$Id: tree.c,v 1.23 1997/03/31 14:02:58 roberto Exp roberto $"; +char *rcs_tree="$Id: tree.c,v 1.24 1997/03/31 14:17:09 roberto Exp roberto $"; #include @@ -40,9 +40,22 @@ static unsigned long hash (char *buff, long size) return h; } + +static void luaI_inittree (void) +{ + int i; + for (i=0; inuse = 0; for (i=0; isize; i++) - if (tb->hash[i] != NULL && tb->hash[i] != &EMPTY) - { + if (tb->hash[i] != NULL && tb->hash[i] != &EMPTY) { int h = tb->hash[i]->hash%newsize; while (newhash[h]) h = (h+1)%newsize; -- cgit v1.2.3-55-g6feb