mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
- memset map header to avoid garbage being written in unused reserved space
This commit is contained in:
@@ -755,6 +755,7 @@ void MapPreview::saveToFile(const string &path) {
|
|||||||
|
|
||||||
//write header
|
//write header
|
||||||
MapFileHeader header;
|
MapFileHeader header;
|
||||||
|
memset(&header,0,sizeof(header));
|
||||||
|
|
||||||
header.version = MAP_FORMAT_VERSION;
|
header.version = MAP_FORMAT_VERSION;
|
||||||
header.maxFactions = maxFactions;
|
header.maxFactions = maxFactions;
|
||||||
|
Reference in New Issue
Block a user