diff --git a/apps/twnlua/game.c b/apps/twnlua/game.c index d06f64c..ace926d 100644 --- a/apps/twnlua/game.c +++ b/apps/twnlua/game.c @@ -37,6 +37,7 @@ static int physfs_loader(lua_State *L) { int64_t buf_size = file_to_bytes(final_path, &buf); free(final_path); + /* TODO: use reader interface for streaming instead */ luaL_loadbuffer(L, (char *)buf, buf_size, name); free(buf); @@ -141,6 +142,7 @@ void game_tick(void) { /* now finally get to running the code */ unsigned char *game_buf = NULL; size_t game_buf_size = file_to_bytes("/scripts/game.lua", &game_buf); + /* TODO: use reader interface for streaming instead */ if (luaL_loadbuffer(state->L, (char *)game_buf, game_buf_size, "game.lua") == LUA_OK) { if (lua_pcall(state->L, 0, 0, 0) != LUA_OK) { log_critical("%s", lua_tostring(state->L, -1));