diff options
author | Mike Pall <mike> | 2016-07-22 16:42:09 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-07-22 16:42:09 +0200 |
commit | 972a1a4cc6791b4595941d32f27ce2242012164c (patch) | |
tree | a011aca7b679826aa400a5e449599329dd76ab0e | |
parent | c98660c8c3921e43029625e51166c9d273ad09df (diff) | |
download | luajit-972a1a4cc6791b4595941d32f27ce2242012164c.tar.gz luajit-972a1a4cc6791b4595941d32f27ce2242012164c.tar.bz2 luajit-972a1a4cc6791b4595941d32f27ce2242012164c.zip |
Fix exit status for 'luajit -b'.
-rw-r--r-- | src/luajit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luajit.c b/src/luajit.c index 4de2d43c..e582f469 100644 --- a/src/luajit.c +++ b/src/luajit.c | |||
@@ -387,7 +387,7 @@ static int dobytecode(lua_State *L, char **argv) | |||
387 | for (argv++; *argv != NULL; narg++, argv++) | 387 | for (argv++; *argv != NULL; narg++, argv++) |
388 | lua_pushstring(L, *argv); | 388 | lua_pushstring(L, *argv); |
389 | report(L, lua_pcall(L, narg, 0, 0)); | 389 | report(L, lua_pcall(L, narg, 0, 0)); |
390 | return 1; | 390 | return -1; |
391 | } | 391 | } |
392 | 392 | ||
393 | /* check that argument has no extra characters at the end */ | 393 | /* check that argument has no extra characters at the end */ |
@@ -580,6 +580,6 @@ int main(int argc, char **argv) | |||
580 | status = lua_cpcall(L, pmain, NULL); | 580 | status = lua_cpcall(L, pmain, NULL); |
581 | report(L, status); | 581 | report(L, status); |
582 | lua_close(L); | 582 | lua_close(L); |
583 | return (status || smain.status) ? EXIT_FAILURE : EXIT_SUCCESS; | 583 | return (status || smain.status > 0) ? EXIT_FAILURE : EXIT_SUCCESS; |
584 | } | 584 | } |
585 | 585 | ||