default size for arrays is no more 101, as arrays now can grow.

This commit is contained in:
Waldemar Celes 1994-09-08 13:51:49 -03:00
parent 0dcae99d74
commit d2117d66ec
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
** TecCGraf - PUC-Rio ** TecCGraf - PUC-Rio
*/ */
char *rcs_opcode="$Id: opcode.c,v 2.4 1994/08/05 19:31:09 celes Exp celes $"; char *rcs_opcode="$Id: opcode.c,v 2.5 1994/08/17 15:02:03 celes Exp celes $";
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -340,11 +340,11 @@ int lua_execute (Byte *pc)
case CREATEARRAY: case CREATEARRAY:
if (tag(top-1) == T_NIL) if (tag(top-1) == T_NIL)
nvalue(top-1) = 101; nvalue(top-1) = 1;
else else
{ {
if (tonumber(top-1)) return 1; if (tonumber(top-1)) return 1;
if (nvalue(top-1) <= 0) nvalue(top-1) = 101; if (nvalue(top-1) <= 0) nvalue(top-1) = 1;
} }
avalue(top-1) = lua_createarray(nvalue(top-1)); avalue(top-1) = lua_createarray(nvalue(top-1));
if (avalue(top-1) == NULL) if (avalue(top-1) == NULL)