diff options
author | Torbjörn Andersson | 2012-08-01 22:34:00 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2012-08-01 22:34:00 +0200 |
commit | 846f9644ddd471b6e6c7b147e971382dddda14fb (patch) | |
tree | 7b51eba2bcd32d94dc15f0bf9838fb411b774628 /engines/tony | |
parent | fab814b7747be31278fbbfa1d46e28115cd6624e (diff) | |
download | scummvm-rg350-846f9644ddd471b6e6c7b147e971382dddda14fb.tar.gz scummvm-rg350-846f9644ddd471b6e6c7b147e971382dddda14fb.tar.bz2 scummvm-rg350-846f9644ddd471b6e6c7b147e971382dddda14fb.zip |
TONY: Clip width to avoid crash when drawing flipped sprite
This fixes - or at least work around - a failed assertion when
Pantagruel leaves the office at the beginning of the game.
Diffstat (limited to 'engines/tony')
-rw-r--r-- | engines/tony/gfxcore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index ca6dd45c14..0c331cc0e9 100644 --- a/engines/tony/gfxcore.cpp +++ b/engines/tony/gfxcore.cpp @@ -927,6 +927,9 @@ void RMGfxSourceBuffer8RLE::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri u = _dimx - (width + u); x1 = (prim->getDst()._x1 + _dimx - 1) - u; + if (width > x1) + width = x1; + // Specify the drawn area bigBuf.addDirtyRect(Common::Rect(x1 - width, y1, x1, y1 + height)); |