diff options
-rw-r--r-- | engines/scumm/he/moonbase/moonbase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/scumm/he/moonbase/moonbase.cpp b/engines/scumm/he/moonbase/moonbase.cpp index 941f32db23..1e8c8fa557 100644 --- a/engines/scumm/he/moonbase/moonbase.cpp +++ b/engines/scumm/he/moonbase/moonbase.cpp @@ -175,6 +175,8 @@ void Moonbase::blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, con } src += 2; pixels++; + if (pixels >= cx + sx) + break; } } else { // skip if ((code & 1) == 0) { @@ -184,6 +186,8 @@ void Moonbase::blitT14WizImage(uint8 *dst, int dstw, int dsth, int dstPitch, con if (pixels >= sx) dst1 += 2; pixels++; + if (pixels >= cx + sx) + break; } } else { // special case if (pixels >= sx) { |