diff options
author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-09-08 13:51:49 -0300 |
---|---|---|
committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1994-09-08 13:51:49 -0300 |
commit | d2117d66ec893ed01efa6bc065f842e39d80e6df (patch) | |
tree | 4b3f5d048eed97e3b65b21e45b609a426f197f2e /opcode.c | |
parent | 0dcae99d7401b38558997056358ca7fc6ffcc9ad (diff) | |
download | lua-d2117d66ec893ed01efa6bc065f842e39d80e6df.tar.gz lua-d2117d66ec893ed01efa6bc065f842e39d80e6df.tar.bz2 lua-d2117d66ec893ed01efa6bc065f842e39d80e6df.zip |
default size for arrays is no more 101, as arrays now can grow.
Diffstat (limited to 'opcode.c')
-rw-r--r-- | opcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 2.4 1994/08/05 19:31:09 celes Exp celes $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 2.5 1994/08/17 15:02:03 celes Exp celes $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
@@ -340,11 +340,11 @@ int lua_execute (Byte *pc) | |||
340 | 340 | ||
341 | case CREATEARRAY: | 341 | case CREATEARRAY: |
342 | if (tag(top-1) == T_NIL) | 342 | if (tag(top-1) == T_NIL) |
343 | nvalue(top-1) = 101; | 343 | nvalue(top-1) = 1; |
344 | else | 344 | else |
345 | { | 345 | { |
346 | if (tonumber(top-1)) return 1; | 346 | if (tonumber(top-1)) return 1; |
347 | if (nvalue(top-1) <= 0) nvalue(top-1) = 101; | 347 | if (nvalue(top-1) <= 0) nvalue(top-1) = 1; |
348 | } | 348 | } |
349 | avalue(top-1) = lua_createarray(nvalue(top-1)); | 349 | avalue(top-1) = lua_createarray(nvalue(top-1)); |
350 | if (avalue(top-1) == NULL) | 350 | if (avalue(top-1) == NULL) |