/apps/twnlua: propagate errors in physfs_loader()

This commit is contained in:
veclavtalica 2025-02-02 02:10:05 +03:00
parent 2c94efb796
commit 108810d68a

View File

@ -34,10 +34,10 @@ static int physfs_loader(lua_State *L) {
free(final_path);
/* TODO: use reader interface for streaming instead */
luaL_loadbuffer(L, (char *)buf, buf_size, name);
int const result = luaL_loadbuffer(L, (char *)buf, buf_size, name) == LUA_OK;
free(buf);
return 1;
return result;
}