From 5787fb3e9889e621c18ae697b96ae92bf97ae5f8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 25 Feb 2011 22:33:40 +0000 Subject: [PATCH] - memset map header to avoid garbage being written in unused reserved space --- source/shared_lib/sources/map/map_preview.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/shared_lib/sources/map/map_preview.cpp b/source/shared_lib/sources/map/map_preview.cpp index e8cd70c3..761f69ea 100644 --- a/source/shared_lib/sources/map/map_preview.cpp +++ b/source/shared_lib/sources/map/map_preview.cpp @@ -755,6 +755,7 @@ void MapPreview::saveToFile(const string &path) { //write header MapFileHeader header; + memset(&header,0,sizeof(header)); header.version = MAP_FORMAT_VERSION; header.maxFactions = maxFactions;