aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorPaweł Kołodziejski2007-05-27 10:53:09 +0000
committerPaweł Kołodziejski2007-05-27 10:53:09 +0000
commit78953e1818e308e47788b7888a1d747abfc59228 (patch)
tree560502007f8cc02e770f12f22ac013ce95fab1cc /engines/agos
parent2d43de587acb02be9822cd5397395583d0b60875 (diff)
downloadscummvm-rg350-78953e1818e308e47788b7888a1d747abfc59228.tar.gz
scummvm-rg350-78953e1818e308e47788b7888a1d747abfc59228.tar.bz2
scummvm-rg350-78953e1818e308e47788b7888a1d747abfc59228.zip
fixed warning and add assert for potential uninitialised src
svn-id: r26964
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/cursor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 864f6b280a..ffb752f411 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -664,7 +664,7 @@ void AGOSEngine::drawMousePointer() {
} else if (getGameType() == GType_SIMON1) {
CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
} else {
- const uint16 *src;
+ const uint16 *src = NULL;
int i, j;
const uint8 color = (getGameType() == GType_ELVIRA1) ? 15: 65;
@@ -721,6 +721,8 @@ void AGOSEngine::drawMousePointer() {
if (_dragFlag != 0)
src = _common_handInfo;
+ assert(src);
+
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j++) {
if (src[0] & (1 << (15 - (j % 16)))) {