From 5f29da4ee005e8c838d0f52e51025228a389c33b Mon Sep 17 00:00:00 2001 From: frosch Date: Wed, 15 Jun 2011 18:53:58 +0000 Subject: (svn r22592) -Fix [FS#4645]: Reading of heightmaps with uncommon BMP formats failed due to uninitialised variables. (Parody) --- src/bmp.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/bmp.cpp') diff --git a/src/bmp.cpp b/src/bmp.cpp index 64b3f14ea..2c85c768b 100644 --- a/src/bmp.cpp +++ b/src/bmp.cpp @@ -13,6 +13,7 @@ #include "bmp.h" #include "core/bitmath_func.hpp" #include "core/alloc_func.hpp" +#include "core/mem_func.hpp" void BmpInitializeBuffer(BmpBuffer *buffer, FILE *file) { @@ -287,6 +288,7 @@ bool BmpReadHeader(BmpBuffer *buffer, BmpInfo *info, BmpData *data) { uint32 header_size; assert(info != NULL); + MemSetT(info, 0); /* Reading BMP header */ if (ReadWord(buffer) != 0x4D42) return false; // signature should be 'BM' -- cgit v1.2.3-54-g00ecf