mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix exit status for 'luajit -b'.
This commit is contained in:
parent
c98660c8c3
commit
972a1a4cc6
@ -387,7 +387,7 @@ static int dobytecode(lua_State *L, char **argv)
|
|||||||
for (argv++; *argv != NULL; narg++, argv++)
|
for (argv++; *argv != NULL; narg++, argv++)
|
||||||
lua_pushstring(L, *argv);
|
lua_pushstring(L, *argv);
|
||||||
report(L, lua_pcall(L, narg, 0, 0));
|
report(L, lua_pcall(L, narg, 0, 0));
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check that argument has no extra characters at the end */
|
/* check that argument has no extra characters at the end */
|
||||||
@ -580,6 +580,6 @@ int main(int argc, char **argv)
|
|||||||
status = lua_cpcall(L, pmain, NULL);
|
status = lua_cpcall(L, pmain, NULL);
|
||||||
report(L, status);
|
report(L, status);
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
return (status || smain.status) ? EXIT_FAILURE : EXIT_SUCCESS;
|
return (status || smain.status > 0) ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user