mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 06:41:59 +00:00
- clear pspAsArray at the beginning of a save/load operation, not at the end.
If done at the end it may leave behind some stale data if saving or loading fails for some reason.
This commit is contained in:
parent
e13426ec6e
commit
bad57f6a5f
2 changed files with 3 additions and 3 deletions
|
@ -1051,8 +1051,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, double &value, double
|
|||
auto val = arc.r->FindKey(key);
|
||||
if (val != nullptr)
|
||||
{
|
||||
assert(val->IsDouble());
|
||||
if (val->IsDouble())
|
||||
assert(val->IsNumber());
|
||||
if (val->IsNumber())
|
||||
{
|
||||
value = val->GetDouble();
|
||||
}
|
||||
|
|
|
@ -301,7 +301,6 @@ void postSerializePanelSprites(FSerializer& arc)
|
|||
}
|
||||
arc.EndArray();
|
||||
}
|
||||
pspAsArray.Clear();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1222,6 +1221,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, TRACK& w, TRACK* d
|
|||
|
||||
void GameInterface::SerializeGameState(FSerializer& arc)
|
||||
{
|
||||
pspAsArray.Clear();
|
||||
Saveable_Init();
|
||||
|
||||
if (arc.BeginObject("state"))
|
||||
|
|
Loading…
Reference in a new issue