Fix "Error: (null)" messages on startup if main script can't be located on disk

This commit is contained in:
Jason Perkins 2015-02-09 12:43:08 -05:00
parent 38c5b79840
commit 1ddb214cc3

View File

@ -69,7 +69,7 @@ LUALIB_API int luaL_loadfile (lua_State* L, const char* filename)
}
/* If the file exists but errors, pass that through */
if (z != OKAY && z != LUA_ERRFILE) {
if (test_name && z != OKAY && z != LUA_ERRFILE) {
return z;
}