Fixed warnings (nice example of why heeding warnings is useful: one of the changes seems to fix a NULL deref)

svn-id: r35933
This commit is contained in:
Max Horn 2009-01-20 02:54:30 +00:00
parent 85d4063000
commit f60e2836b0
2 changed files with 3 additions and 3 deletions

View file

@ -692,10 +692,11 @@ void LoLEngine::resetItems(int flag) {
for (int i = 0; i < 1024; i++) { for (int i = 0; i < 1024; i++) {
_levelBlockProperties[i].field_8 = 5; _levelBlockProperties[i].field_8 = 5;
uint16 id = _levelBlockProperties[i].itemIndex; uint16 id = _levelBlockProperties[i].itemIndex;
LVL * r = 0; LVL *r = 0;
while (id & 0x8000) { while (id & 0x8000) {
LVL * r = (LVL*) cmzGetItemOffset(id); r = (LVL*)cmzGetItemOffset(id);
assert(r);
id = r->itemIndexUnk; id = r->itemIndexUnk;
} }

View file

@ -364,7 +364,6 @@ int LoLEngine::o2_getUnkArrayVal(EMCState *script) {
} }
int LoLEngine::o2_setUnkArrayVal(EMCState *script) { int LoLEngine::o2_setUnkArrayVal(EMCState *script) {
int a=stackPos(0);
_unkEMC46[stackPos(0)] = stackPos(1); _unkEMC46[stackPos(0)] = stackPos(1);
return 1; return 1;
} }