Fix constructing executable path from argv[0].
Do not leave unwanted stuff in the stack in premake_locate_executable(), as the caller only expects exactly one string to be pushed.
This commit is contained in:
parent
3556135a56
commit
6fe0b64f6b
@ -409,6 +409,7 @@ int premake_locate_executable(lua_State* L, const char* argv0)
|
||||
lua_concat(L, 3);
|
||||
path = lua_tostring(L, -1);
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
/* If all else fails, use argv[0] as-is and hope for the best */
|
||||
@ -428,6 +429,7 @@ int premake_locate_executable(lua_State* L, const char* argv0)
|
||||
}
|
||||
|
||||
path = lua_tostring(L, -1);
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
lua_pushstring(L, path);
|
||||
|
Loading…
Reference in New Issue
Block a user