mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 20:48:09 +00:00
GameSettings: ensure savegameID is either a file name or undefined.
The current code could end up with savegameID being undefined, false, a filename string, or null depending on the code path taken. Adapt C++ in consequence.
This commit is contained in:
1 parent
fba5a23aad
commit
a8fc3cf254
4 files changed
+5
-5
No files matched your search
@@ -283,7 +283,7 @@ void StartNetworkGame(const ScriptInterface& scriptInterface, JS::HandleValue sa
|
||||
JS::RootedValue attribs(rq.cx, attribs1);
|
||||
std::string attributesAsString{Script::StringifyJSON(rq, &attribs)};
|
||||
|
||||
if (savegame.isFalse())
|
||||
if (savegame.isUndefined())
|
||||
{
|
||||
g_NetClient->SendStartGameMessage(attributesAsString);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user