Fix demos recorded without mapdata not being loadable

As the demo player skips the map data when loading the demo, the size of the map specified in the demo must be zero when no map data is embedded.
This commit is contained in:
Robert Müller 2022-08-25 17:36:04 +02:00
parent 5c2f162da2
commit 3f1b702b90

View file

@ -124,7 +124,9 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con
CloseMapFile = true; CloseMapFile = true;
} }
if(MapFile) if(m_NoMapData)
MapSize = 0;
else if(MapFile)
MapSize = io_length(MapFile); MapSize = io_length(MapFile);
// write header // write header