/apps/twnlua: output lua_loadbuffer errors
This commit is contained in:
parent
bedfe0cdfb
commit
ffc3badc50
@ -47,10 +47,13 @@ static int physfs_loader(lua_State *L) {
|
||||
free(final_path);
|
||||
|
||||
/* TODO: use reader interface for streaming instead */
|
||||
int const result = luaL_loadbuffer(L, (char *)buf, buf_size, name) == LUA_OK;
|
||||
int const result = luaL_loadbuffer(L, (char *)buf, buf_size, name);
|
||||
free(buf);
|
||||
|
||||
return result;
|
||||
if (result != LUA_OK)
|
||||
log_critical("%s", lua_tostring(L, -1));
|
||||
|
||||
return result == LUA_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user