diff options
| -rw-r--r-- | opcode.c | 8 |
1 files changed, 3 insertions, 5 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 3.40 1995/10/04 14:20:26 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.41 1995/10/09 13:10:20 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdlib.h> | 9 | #include <stdlib.h> |
| @@ -91,13 +91,11 @@ static void growstack (void) | |||
| 91 | else | 91 | else |
| 92 | { | 92 | { |
| 93 | Long maxstack = stackLimit - stack; | 93 | Long maxstack = stackLimit - stack; |
| 94 | if (maxstack >= MAX_INT) | ||
| 95 | lua_error("stack size overflow"); | ||
| 96 | maxstack *= 2; | 94 | maxstack *= 2; |
| 97 | if (maxstack >= MAX_INT) | ||
| 98 | maxstack = MAX_INT; | ||
| 99 | stack = growvector(stack, maxstack, Object); | 95 | stack = growvector(stack, maxstack, Object); |
| 100 | stackLimit = stack+maxstack; | 96 | stackLimit = stack+maxstack; |
| 97 | if (maxstack >= MAX_WORD/2) | ||
| 98 | lua_error("stack size overflow"); | ||
| 101 | } | 99 | } |
| 102 | top = stack + t; | 100 | top = stack + t; |
| 103 | } | 101 | } |
