diff options
-rw-r--r-- | iolib.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Input/output library to LUA | 3 | ** Input/output library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_iolib="$Id: iolib.c,v 1.39 1996/03/14 15:55:18 roberto Exp roberto $"; | 6 | char *rcs_iolib="$Id: iolib.c,v 1.40 1996/03/19 22:28:37 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdio.h> | 8 | #include <stdio.h> |
9 | #include <ctype.h> | 9 | #include <ctype.h> |
@@ -529,9 +529,8 @@ static void io_date (void) | |||
529 | static void io_exit (void) | 529 | static void io_exit (void) |
530 | { | 530 | { |
531 | lua_Object o = lua_getparam(1); | 531 | lua_Object o = lua_getparam(1); |
532 | if (lua_isstring(o)) | 532 | int code = lua_isnumber(o) ? (int)lua_getnumber(o) : 1; |
533 | fprintf(stderr, "%s\n", lua_getstring(o)); | 533 | exit(code); |
534 | exit(1); | ||
535 | } | 534 | } |
536 | 535 | ||
537 | /* | 536 | /* |