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

This commit is contained in:
glx 2007-01-11 21:49:39 +00:00
parent 7885defae5
commit 2533b4a520
1 changed files with 3 additions and 0 deletions

View File

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