Name boot.lua chunk properly;

This makes error messages nicer.
This commit is contained in:
bjorn 2019-12-28 23:18:03 -08:00
parent e538965f77
commit 79fd5ad7d8
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ lua_State* lovrInit(lua_State* L, int argc, char** argv) {
lua_pop(L, 2);
lua_pushcfunction(L, luax_getstack);
if (luaL_loadbuffer(L, (const char*) src_resources_boot_lua, src_resources_boot_lua_len, "boot.lua") || lua_pcall(L, 0, 1, -2)) {
if (luaL_loadbuffer(L, (const char*) src_resources_boot_lua, src_resources_boot_lua_len, "@boot.lua") || lua_pcall(L, 0, 1, -2)) {
fprintf(stderr, "%s\n", lua_tostring(L, -1));
return NULL;
}

View File

@ -408,7 +408,7 @@ static void bridgeLovrInitState() {
// Run init
lua_pushcfunction(L, luax_getstack);
if (luaL_loadbuffer(L, (const char*) src_resources_boot_lua, src_resources_boot_lua_len, "boot.lua") || lua_pcall(L, 0, 1, -2)) {
if (luaL_loadbuffer(L, (const char*) src_resources_boot_lua, src_resources_boot_lua_len, "@boot.lua") || lua_pcall(L, 0, 1, -2)) {
WARN("\n LUA STARTUP FAILED: %s\n", lua_tostring(L, -1));
lua_close(L);
assert(0);