From 6312a55bac174e9f0205a839597bebf5dd06f44c Mon Sep 17 00:00:00 2001 From: Frank Zago Date: Wed, 19 Aug 2009 05:00:59 +0000 Subject: [PATCH] Fixed uninitialized variables. --- client/CBattleInterface.cpp | 2 +- hch/CDefHandler.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client/CBattleInterface.cpp b/client/CBattleInterface.cpp index 49d5d49da..4a37ccd55 100644 --- a/client/CBattleInterface.cpp +++ b/client/CBattleInterface.cpp @@ -2444,7 +2444,7 @@ void CBattleHero::clickLeft(tribool down, bool previousState) } } -CBattleHero::CBattleHero(const std::string & defName, int phaseG, int imageG, bool flipG, unsigned char player, const CGHeroInstance * hero, const CBattleInterface * owner): flip(flipG), myHero(hero), myOwner(owner), phase(phaseG), nextPhase(-1), image(imageG), flagAnim(0) +CBattleHero::CBattleHero(const std::string & defName, int phaseG, int imageG, bool flipG, unsigned char player, const CGHeroInstance * hero, const CBattleInterface * owner): flip(flipG), myHero(hero), myOwner(owner), phase(phaseG), nextPhase(-1), image(imageG), flagAnim(0), flagAnimCount(0) { dh = CDefHandler::giveDef( defName ); for(int i=0; iourImages.size(); ++i) //transforming images diff --git a/hch/CDefHandler.cpp b/hch/CDefHandler.cpp index 5167d1220..8f0e663c6 100644 --- a/hch/CDefHandler.cpp +++ b/hch/CDefHandler.cpp @@ -129,7 +129,6 @@ void CDefHandler::openDef(std::string name) void CDefHandler::openFromMemory(unsigned char *table, std::string name) { int i,j, totalInBlock; - char Buffer[13]; BMPPalette palette[256]; defName=name; i = 0; @@ -161,9 +160,12 @@ void CDefHandler::openFromMemory(unsigned char *table, std::string name) i+=4; for (j=0; j