diff options
author | Colin Snover | 2016-12-31 20:39:57 -0600 |
---|---|---|
committer | Colin Snover | 2017-03-27 19:42:31 -0500 |
commit | 31daa956d62b39429cb6638ed3fb549ac488833a (patch) | |
tree | fa831adefae05d82209b3f565055f7b761ca8691 /engines/sci/graphics/compare.cpp | |
parent | 1298762b7665dc1b7aeedf0271eadfb284309ef1 (diff) | |
download | scummvm-rg350-31daa956d62b39429cb6638ed3fb549ac488833a.tar.gz scummvm-rg350-31daa956d62b39429cb6638ed3fb549ac488833a.tar.bz2 scummvm-rg350-31daa956d62b39429cb6638ed3fb549ac488833a.zip |
SCI: Implement bounds-checked reads of game resources
Diffstat (limited to 'engines/sci/graphics/compare.cpp')
-rw-r--r-- | engines/sci/graphics/compare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 36026a8134..582dd328dc 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -197,7 +197,7 @@ bool GfxCompare::kernelIsItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, const CelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo); position.x = CLIP<int>(position.x, 0, celInfo->width - 1); position.y = CLIP<int>(position.y, 0, celInfo->height - 1); - const byte *celData = tmpView->getBitmap(loopNo, celNo); + const SciSpan<const byte> &celData = tmpView->getBitmap(loopNo, celNo); bool result = (celData[position.y * celInfo->width + position.x] == celInfo->clearKey); return result; } |