diff options
author | Sven Hesse | 2007-04-09 14:00:23 +0000 |
---|---|---|
committer | Sven Hesse | 2007-04-09 14:00:23 +0000 |
commit | 0d99a362e9323da21081da4719359ead62ce45d4 (patch) | |
tree | 37c8d26115eb3415fbec8624841dc517ceaaf09d /engines/gob/driver_vga.cpp | |
parent | 871e83d0705fc3a18a3cb4e7db1e77ee6481422f (diff) | |
download | scummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.tar.gz scummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.tar.bz2 scummvm-rg350-0d99a362e9323da21081da4719359ead62ce45d4.zip |
Some fixes for the Gob3 demos
svn-id: r26435
Diffstat (limited to 'engines/gob/driver_vga.cpp')
-rw-r--r-- | engines/gob/driver_vga.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/driver_vga.cpp b/engines/gob/driver_vga.cpp index 759136180e..4923387ef8 100644 --- a/engines/gob/driver_vga.cpp +++ b/engines/gob/driver_vga.cpp @@ -105,8 +105,8 @@ void VGAVideoDriver::drawSprite(SurfaceDesc *source, SurfaceDesc *dest, (y >= dest->getHeight()) || (y < 0)) return; - int16 width = (right - left) + 1; - int16 height = (bottom - top) + 1; + int16 width = MIN((right - left) + 1, (int) dest->getWidth()); + int16 height = MIN((bottom - top) + 1, (int) dest->getHeight()); byte *srcPos = source->getVidMem() + (top * source->getWidth()) + left; byte *destPos = dest->getVidMem() + (y * dest->getWidth()) + x; |