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.

(cherry picked from commit a8fc3cf254)
Signed-off-by: Itms <itms@wildfiregames.com>
This commit is contained in:
Lancelot de Ferrière
2024-12-31 12:54:21 +01:00
committed by Itms
parent 795af45a7a
commit 85363e861e
4 changed files with 5 additions and 5 deletions
@@ -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;