mirror of https://github.com/OpenTTD/OpenTTD
(svn r8070) -Fix r5815: missing initialisation could cause crash when loading 24bpp BMP heightmap
parent
7885defae5
commit
2533b4a520
|
@ -226,6 +226,9 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map)
|
||||||
BmpData data;
|
BmpData data;
|
||||||
BmpBuffer buffer;
|
BmpBuffer buffer;
|
||||||
|
|
||||||
|
// Init BmpData
|
||||||
|
memset(&data, 0, sizeof(data));
|
||||||
|
|
||||||
f = fopen(filename, "rb");
|
f = fopen(filename, "rb");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
ShowErrorMessage(STR_PNGMAP_ERR_FILE_NOT_FOUND, STR_BMPMAP_ERROR, 0, 0);
|
ShowErrorMessage(STR_PNGMAP_ERR_FILE_NOT_FOUND, STR_BMPMAP_ERROR, 0, 0);
|
||||||
|
|
Loading…
Reference in New Issue