Skip to content

Commit

Permalink
Fix a crash when loading a saved game of a challenge from CLI
Browse files Browse the repository at this point in the history
Closes #437.
  • Loading branch information
topimiettinen authored and KJeff01 committed Jul 11, 2019
1 parent 6f24a6c commit 244fd2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/clparse.cpp
Expand Up @@ -581,6 +581,7 @@ bool ParseCommandLine(int argc, const char * const *argv)
qFatal("Unrecognised skirmish savegame name");
}
snprintf(saveGameName, sizeof(saveGameName), "%s/skirmish/%s.gam", SaveGamePath, token);
sstrcpy(sRequestResult, saveGameName); // hack to avoid crashes
SPinit();
bMultiPlayer = true;
game.type = SKIRMISH; // tutorial is skirmish for some reason
Expand Down

0 comments on commit 244fd2c

Please sign in to comment.