Changeset - r5613:43cf51840b92
[Not reviewed]
master
0 1 0
glx - 17 years ago 2007-01-11 21:49:39
glx@openttd.org
(svn r8070) -Fix r5815: missing initialisation could cause crash when loading 24bpp BMP heightmap
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/heightmap.cpp
Show inline comments
 
@@ -223,12 +223,15 @@ static bool ReadHeightmapBMP(char *filen
 
{
 
	FILE *f;
 
	BmpInfo info;
 
	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);
 
		return false;
 
	}
 

	
0 comments (0 inline, 0 general)