From 3f1b702b901f20b9ff08b24458db1415a2c0041a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 25 Aug 2022 17:36:04 +0200 Subject: [PATCH] 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. --- src/engine/shared/demo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/shared/demo.cpp b/src/engine/shared/demo.cpp index b0af12c8a..6e1a2b531 100644 --- a/src/engine/shared/demo.cpp +++ b/src/engine/shared/demo.cpp @@ -124,7 +124,9 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con CloseMapFile = true; } - if(MapFile) + if(m_NoMapData) + MapSize = 0; + else if(MapFile) MapSize = io_length(MapFile); // write header