diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-31 11:28:17 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-31 11:28:17 -0300 |
| commit | d63afba9d3310131a6db65cbac541704f8aad61a (patch) | |
| tree | 23da5d35ca85570161883d1b629fccaa237b158e | |
| parent | 100bfec39a3de3029a97e645e7fe33877d7bbc2f (diff) | |
| download | lua-d63afba9d3310131a6db65cbac541704f8aad61a.tar.gz lua-d63afba9d3310131a6db65cbac541704f8aad61a.tar.bz2 lua-d63afba9d3310131a6db65cbac541704f8aad61a.zip | |
negative stack sizes are invalid, too.
| -rw-r--r-- | lua.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.46 2000/08/28 17:57:04 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.47 2000/08/29 14:33:31 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -286,7 +286,7 @@ static int handle_argv (char *argv[], struct Options *opt) { | |||
| 286 | static void getstacksize (int argc, char *argv[], struct Options *opt) { | 286 | static void getstacksize (int argc, char *argv[], struct Options *opt) { |
| 287 | if (argc >= 2 && argv[1][0] == '-' && argv[1][1] == 's') { | 287 | if (argc >= 2 && argv[1][0] == '-' && argv[1][1] == 's') { |
| 288 | int stacksize = atoi(&argv[1][2]); | 288 | int stacksize = atoi(&argv[1][2]); |
| 289 | if (stacksize == 0) { | 289 | if (stacksize <= 0) { |
| 290 | fprintf(stderr, "lua: invalid stack size ('%s')\n", &argv[1][2]); | 290 | fprintf(stderr, "lua: invalid stack size ('%s')\n", &argv[1][2]); |
| 291 | exit(EXIT_FAILURE); | 291 | exit(EXIT_FAILURE); |
| 292 | } | 292 | } |
