mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- fixed: array clamping may only be done when reading a savegame.
- fixed generation of savegame names for level snapshots.
This commit is contained in:
parent
e01965b747
commit
68dc75bf9e
2 changed files with 7 additions and 4 deletions
|
@ -1571,7 +1571,7 @@ void G_WriteSnapshots(TArray<FString> &filenames, TArray<FCompressedBuffer> &buf
|
|||
{
|
||||
if (wadlevelinfos[i].Snapshot.mCompressedSize > 0)
|
||||
{
|
||||
filename << wadlevelinfos[i].MapName << ".map.json";
|
||||
filename.Format("%s.map.json", wadlevelinfos[i].MapName.GetChars());
|
||||
filename.ToLower();
|
||||
filenames.Push(filename);
|
||||
buffers.Push(wadlevelinfos[i].Snapshot);
|
||||
|
@ -1579,7 +1579,7 @@ void G_WriteSnapshots(TArray<FString> &filenames, TArray<FCompressedBuffer> &buf
|
|||
}
|
||||
if (TheDefaultLevelInfo.Snapshot.mCompressedSize > 0)
|
||||
{
|
||||
filename << TheDefaultLevelInfo.MapName << ".mapd.json";
|
||||
filename.Format("%s.mapd.json", TheDefaultLevelInfo.MapName.GetChars());
|
||||
filename.ToLower();
|
||||
filenames.Push(filename);
|
||||
buffers.Push(TheDefaultLevelInfo.Snapshot);
|
||||
|
|
|
@ -111,8 +111,11 @@ public:
|
|||
|
||||
if (BeginArray(key))
|
||||
{
|
||||
int max = ArraySize();
|
||||
if (max < count) count = max;
|
||||
if (isReading())
|
||||
{
|
||||
int max = ArraySize();
|
||||
if (max < count) count = max;
|
||||
}
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Serialize(*this, nullptr, obj[i], (T*)nullptr);
|
||||
|
|
Loading…
Reference in a new issue