Fix segfault when dofile() called within _premake_main()
This commit is contained in:
parent
e2f36deda8
commit
24050ebc2c
@ -49,7 +49,7 @@ LUALIB_API int luaL_loadfile (lua_State* L, const char* filename)
|
||||
const char* script_dir;
|
||||
lua_getglobal(L, "_SCRIPT_DIR");
|
||||
script_dir = lua_tostring(L, -1);
|
||||
if (script_dir[0] == '$') {
|
||||
if (script_dir && script_dir[0] == '$') {
|
||||
/* call path.getabsolute() to handle ".." if present */
|
||||
lua_pushcfunction(L, path_getabsolute);
|
||||
lua_pushstring(L, filename);
|
||||
|
Loading…
Reference in New Issue
Block a user