Fix bug #1235211: "SAGA: Fails to compile with gcc4.0"

svn-id: r18526
This commit is contained in:
Eugene Sandulenko 2005-07-09 21:29:54 +00:00
parent 237eefba64
commit 02d28a96ce
2 changed files with 8 additions and 6 deletions

View File

@ -867,8 +867,9 @@ void IsoMap::drawTile(Surface *ds, uint16 tileIndex, const Point &point, const L
col++;
}
while ((col < _tileClip.right) && (count < fgRunCount)) {
assert((uint)ds->pixels <= (uint)(drawPointer + count));
assert(((uint)ds->pixels + (_vm->getDisplayWidth() * _vm->getDisplayHeight())) > (uint)(drawPointer + count));
assert((byte *)ds->pixels <= (byte *)(drawPointer + count));
assert((byte *)((byte *)ds->pixels + (_vm->getDisplayWidth() *
_vm->getDisplayHeight())) > (byte *)(drawPointer + count));
drawPointer[count] = readPointer[count];
count++;
col++;

View File

@ -203,10 +203,11 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
}
for (i = io; i < clipHeight; i++) {
for (j = jo; j < clipWidth; j++) {
assert((uint)ds->pixels <= (uint)(bufRowPointer + j + spritePointer.x));
assert(((uint)ds->pixels + (_vm->getDisplayWidth() * _vm->getDisplayHeight())) > (uint)(bufRowPointer + j + spritePointer.x));
assert((uint)spriteBuffer <= (uint)(srcRowPointer + j));
assert(((uint)spriteBuffer + (width * height)) > (uint)(srcRowPointer + j));
assert((byte *)ds->pixels <= (byte *)(bufRowPointer + j + spritePointer.x));
assert(((byte *)ds->pixels + (_vm->getDisplayWidth() *
_vm->getDisplayHeight())) > (byte *)(bufRowPointer + j + spritePointer.x));
assert((const byte *)spriteBuffer <= (const byte *)(srcRowPointer + j));
assert(((const byte *)spriteBuffer + (width * height)) > (const byte *)(srcRowPointer + j));
if (*(srcRowPointer + j) != 0) {
*(bufRowPointer + j + spritePointer.x) = *(srcRowPointer + j);