(svn r8070) -Fix r5815: missing initialisation could cause crash when loading 24bpp BMP heightmap

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
glx 18 years ago
parent 7885defae5
commit 2533b4a520

@ -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);

Loading…
Cancel
Save