diff options
author | Martin Kiewitz | 2010-01-16 19:25:09 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-16 19:25:09 +0000 |
commit | bc3405cc9e4e29cbe1cbc9e5a8b77d8834a2ea10 (patch) | |
tree | dc107a4cfdb4b263996ba77cfebf45a5255219f9 /engines | |
parent | 971cfcbd9eb73b5f0c035aa82273384698457269 (diff) | |
download | scummvm-rg350-bc3405cc9e4e29cbe1cbc9e5a8b77d8834a2ea10.tar.gz scummvm-rg350-bc3405cc9e4e29cbe1cbc9e5a8b77d8834a2ea10.tar.bz2 scummvm-rg350-bc3405cc9e4e29cbe1cbc9e5a8b77d8834a2ea10.zip |
SCI: view scaling - dont fill left-over bytes if there are no left-over bytes :P
svn-id: r47329
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/graphics/view.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index 27aada5295..f5f1d539da 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -568,7 +568,8 @@ void View::drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect cli scaledPixel += scaleY; } scaledPixelNo++; - memset(&scalingY[scaledPixelNo], pixelNo - 1, scaledHeight - scaledPixelNo); + if (scaledPixelNo < scaledHeight) + memset(&scalingY[scaledPixelNo], pixelNo - 1, scaledHeight - scaledPixelNo); // Create width scaling table pixelNo = 0; @@ -583,7 +584,8 @@ void View::drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect cli scaledPixel += scaleX; } scaledPixelNo++; - memset(&scalingX[scaledPixelNo], pixelNo - 1, scaledWidth - scaledPixelNo); + if (scaledPixelNo < scaledWidth) + memset(&scalingX[scaledPixelNo], pixelNo - 1, scaledWidth - scaledPixelNo); scaledWidth = MIN(clipRect.width(), scaledWidth); scaledHeight = MIN(clipRect.height(), scaledHeight); |