Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall
2025-04-07 10:33:15 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -122,8 +122,9 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
copyTV(L, L->top-1, L->top);
}
if (err) {
const char *fname = filename ? filename : "stdin";
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 status;