diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge/vga13h.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 32e0fd6090..21aec31e5d 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -1261,8 +1261,8 @@ void BITMAP::Show(int x, int y) { // must be decompressed and inserted into the surface for (int planeCtr = 0; planeCtr < 4; ++planeCtr) { destP = (byte *)rawSurface.getBasePtr(planeCtr, 0); - - while (destP < destEndP) { + + for (;;) { uint16 v = READ_LE_UINT16(srcP); srcP += 2; int cmd = v >> 14; @@ -1273,6 +1273,8 @@ void BITMAP::Show(int x, int y) { break; } + assert(destP < destEndP); + // Handle a set of pixels while (count-- > 0) { // Transfer operation |