Mercurial > hg > openttd
changeset 17807:8015cecf73ea draft
(svn r22592) -Fix [FS#4645]: Reading of heightmaps with uncommon BMP formats failed due to uninitialised variables. (Parody)
author | frosch <frosch@openttd.org> |
---|---|
date | Wed, 15 Jun 2011 18:53:58 +0000 |
parents | b35c6d06bbef |
children | 18a703930505 |
files | src/bmp.cpp |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ { uint32 header_size; assert(info != NULL); + MemSetT(info, 0); /* Reading BMP header */ if (ReadWord(buffer) != 0x4D42) return false; // signature should be 'BM'