forked from pool/lua54
de2a8a49ea
* Fixed 11 bugs from 5.4.6 * Tests now run on shared libraries - Removed skip-tests_big-endian.patch: fixed upstream OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=92
16 lines
539 B
Diff
16 lines
539 B
Diff
Inspect errno only after failure
|
|
|
|
Index: lua-5.4.6/src/lauxlib.c
|
|
===================================================================
|
|
--- lua-5.4.6.orig/src/lauxlib.c
|
|
+++ lua-5.4.6/src/lauxlib.c
|
|
@@ -283,7 +283,7 @@ LUALIB_API int luaL_fileresult (lua_Stat
|
|
|
|
|
|
LUALIB_API int luaL_execresult (lua_State *L, int stat) {
|
|
- if (stat != 0 && errno != 0) /* error with an 'errno'? */
|
|
+ if (stat == -1) /* error with an 'errno'? */
|
|
return luaL_fileresult(L, 0, NULL);
|
|
else {
|
|
const char *what = "exit"; /* type of termination */
|