mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r8070) -Fix r5815: missing initialisation could cause crash when loading 24bpp BMP heightmap
This commit is contained in:
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…
Reference in New Issue
Block a user