mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-19 05:23:27 +00:00
parent
e9e4b6d302
commit
e76bb50d44
@ -108,8 +108,9 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
|
|||||||
copyTV(L, L->top-1, L->top);
|
copyTV(L, L->top-1, L->top);
|
||||||
}
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
|
const char *fname = filename ? filename : "stdin";
|
||||||
L->top--;
|
L->top--;
|
||||||
lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(err));
|
lua_pushfstring(L, "cannot read %s: %s", fname, strerror(err));
|
||||||
return LUA_ERRFILE;
|
return LUA_ERRFILE;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user