summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-03-25 23:28:05 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2008-03-25 23:28:05 +0000
commitadb2d7987c0395ae9814dc6f8adccc3f0ef7afe4 (patch)
tree984ead5ae02b7c89db2fa55f9d6702eb44834cd3
parentdf4edbc8cbe7cf53f3918921a5791afc2cecc264 (diff)
downloadmana-adb2d7987c0395ae9814dc6f8adccc3f0ef7afe4.tar.gz
mana-adb2d7987c0395ae9814dc6f8adccc3f0ef7afe4.tar.bz2
mana-adb2d7987c0395ae9814dc6f8adccc3f0ef7afe4.tar.xz
mana-adb2d7987c0395ae9814dc6f8adccc3f0ef7afe4.zip
Initialized some uninitialized variables (patch by peavey).
-rw-r--r--ChangeLog5
-rw-r--r--src/gui/progressbar.cpp3
-rw-r--r--src/localplayer.cpp8
3 files changed, 11 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3936e992..be80f204 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-26 Philipp Sehmisch <tmw@crushnet.org>
+
+ * src/gui/progressbar.cpp, src/localplayer.cpp: Initialized some
+ uninitialized variables (patch by peavey).
+
2008-03-23 Bjørn Lindeijer <bjorn@lindeijer.nl>
* src/engine.h, src/gui/viewport.h, src/engine.cpp,
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp
index 6d18b2f7..6851484f 100644
--- a/src/gui/progressbar.cpp
+++ b/src/gui/progressbar.cpp
@@ -35,10 +35,9 @@ ProgressBar::ProgressBar(float progress,
unsigned int width, unsigned int height,
Uint8 red, Uint8 green, Uint8 blue):
gcn::Widget(),
- mRed(red), mGreen(green), mBlue(blue),
+ mProgress(progress), mRed(red), mGreen(green), mBlue(blue),
mRedToGo(red), mGreenToGo(green), mBlueToGo(blue)
{
- setProgress(progress);
setWidth(width);
setHeight(height);
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 3b8dda9e..0ed23892 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -43,11 +43,13 @@ LocalPlayer *player_node = NULL;
LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
Player(id, job, map),
+ mXpForNextLevel(0),
mAttackRange(0),
mInventory(new Inventory),
- mXp(0),
+ mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
- mTrading(false), mLastAction(-1)
+ mTrading(false), mLastAction(-1),
+ mWalkingDir(0), mDestX(0), mDestY(0)
{
}
@@ -247,7 +249,7 @@ void LocalPlayer::setDestination(Uint16 x, Uint16 y)
mDestX = x;
mDestY = y;
- char temp[3];
+ char temp[4] = "";
MessageOut outMsg(mNetwork);
set_coordinates(temp, x, y, mDirection);
outMsg.writeInt16(0x0085);