mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-21 11:31:41 +00:00
Fix gameinfo load from same directory as file containing gameinfo lump
Fixes scenario 2 in https://github.com/ZDoom/gzdoom/issues/2011#issuecomment-1440997829
This commit is contained in:
parent
ea51c92fda
commit
bd4f4f739a
1 changed files with 3 additions and 2 deletions
|
@ -1798,6 +1798,8 @@ static FString ParseGameInfo(std::vector<std::string> &pwads, const char *fn, co
|
|||
bool isDir;
|
||||
|
||||
const char *lastSlash = strrchr (fn, '/');
|
||||
if (lastSlash == NULL)
|
||||
lastSlash = strrchr (fn, ':');
|
||||
|
||||
sc.OpenMem("GAMEINFO", data, size);
|
||||
while(sc.GetToken())
|
||||
|
@ -1822,8 +1824,7 @@ static FString ParseGameInfo(std::vector<std::string> &pwads, const char *fn, co
|
|||
FString checkpath;
|
||||
if (lastSlash != NULL)
|
||||
{
|
||||
checkpath = FString(fn, (lastSlash - fn) + 1);
|
||||
checkpath += sc.String;
|
||||
checkpath = FString(fn, lastSlash - fn) + '/' + sc.String;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue