diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/heightmap.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/heightmap.cpp b/src/heightmap.cpp index adedc06b4..7d1809410 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -226,6 +226,9 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map) BmpData data; BmpBuffer buffer; + // Init BmpData + memset(&data, 0, sizeof(data)); + f = fopen(filename, "rb"); if (f == NULL) { ShowErrorMessage(STR_PNGMAP_ERR_FILE_NOT_FOUND, STR_BMPMAP_ERROR, 0, 0); |