/apps/twnlua: output lua_loadbuffer errors
This commit is contained in:
1 parent
bedfe0cdfb
commit
ffc3badc50
1 file changed
+5
-2
+5
-2
@@ -47,10 +47,13 @@ static int physfs_loader(lua_State *L) {
|
|||||||
free(final_path);
|
free(final_path);
|
||||||
|
|
||||||
/* TODO: use reader interface for streaming instead */
|
/* 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);
|
free(buf);
|
||||||
|
|
||||||
return result;
|
if (result != LUA_OK)
|
||||||
|
log_critical("%s", lua_tostring(L, -1));
|
||||||
|
|
||||||
|
return result == LUA_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user