aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorMax Horn2009-01-20 02:54:30 +0000
committerMax Horn2009-01-20 02:54:30 +0000
commitf60e2836b05c922b2ae89b121b4f23fea60de3fc (patch)
tree014e19583a3be00582e5c849030e1baf2ac588cd /engines/kyra
parent85d40630004d5a615a7708d76f99d4507886c396 (diff)
downloadscummvm-rg350-f60e2836b05c922b2ae89b121b4f23fea60de3fc.tar.gz
scummvm-rg350-f60e2836b05c922b2ae89b121b4f23fea60de3fc.tar.bz2
scummvm-rg350-f60e2836b05c922b2ae89b121b4f23fea60de3fc.zip
Fixed warnings (nice example of why heeding warnings is useful: one of the changes seems to fix a NULL deref)
svn-id: r35933
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/scene_lol.cpp5
-rw-r--r--engines/kyra/script_lol.cpp1
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index e860bb3f5a..2c6437605e 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -692,10 +692,11 @@ void LoLEngine::resetItems(int flag) {
for (int i = 0; i < 1024; i++) {
_levelBlockProperties[i].field_8 = 5;
uint16 id = _levelBlockProperties[i].itemIndex;
- LVL * r = 0;
+ LVL *r = 0;
while (id & 0x8000) {
- LVL * r = (LVL*) cmzGetItemOffset(id);
+ r = (LVL*)cmzGetItemOffset(id);
+ assert(r);
id = r->itemIndexUnk;
}
diff --git a/engines/kyra/script_lol.cpp b/engines/kyra/script_lol.cpp
index 5c559242ee..2ced8b6bf7 100644
--- a/engines/kyra/script_lol.cpp
+++ b/engines/kyra/script_lol.cpp
@@ -364,7 +364,6 @@ int LoLEngine::o2_getUnkArrayVal(EMCState *script) {
}
int LoLEngine::o2_setUnkArrayVal(EMCState *script) {
- int a=stackPos(0);
_unkEMC46[stackPos(0)] = stackPos(1);
return 1;
}