From 1cbd56693086afa8ce93092c3638e1052e31a5d9 Mon Sep 17 00:00:00 2001 From: athrxx Date: Thu, 29 Sep 2011 22:51:36 +0200 Subject: KYRA: (EOB) - fix invalid string access (also fix several cpp-check warnings) --- engines/kyra/sprites_eob.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/kyra/sprites_eob.cpp') diff --git a/engines/kyra/sprites_eob.cpp b/engines/kyra/sprites_eob.cpp index 2dc9405f72..6d8776f3b0 100644 --- a/engines/kyra/sprites_eob.cpp +++ b/engines/kyra/sprites_eob.cpp @@ -657,13 +657,13 @@ void EobCoreEngine::drawFlyingObjects(int index) { flipped = fo->direction == ((_currentDirection + 1) & 3) ? 1 : 0; } else { shp = (_flightObjShpMap[shpIx] + dirOffs) < _numThrownItemShapes ? _thrownItemShapes[_flightObjShpMap[shpIx] + dirOffs] : _spellShapes[_flightObjShpMap[shpIx - _numThrownItemShapes] + dirOffs]; - flipped = _flightObjFlipIndex[(fo->direction << 2) + fo->curPos]; + flipped = _flightObjFlipIndex[(fo->direction << 2) + (fo->curPos & 3)]; } } else { rstFade = true; shp = (fo->objectType < _numThrownItemShapes) ? _thrownItemShapes[fo->objectType] : _spellShapes[fo->objectType - _numThrownItemShapes]; - flipped = _flightObjFlipIndex[(fo->direction << 2) + fo->curPos]; + flipped = _flightObjFlipIndex[(fo->direction << 2) + (fo->curPos & 3)]; if (fo->flags & 0x40) { x = _dscShapeCoords[(index * 5 + 4) << 1] + 88; -- cgit v1.2.3