diff options
author | Colin Snover | 2016-05-27 15:25:36 -0500 |
---|---|---|
committer | Colin Snover | 2016-05-27 15:54:14 -0500 |
commit | 4840b889d7c8d2924f162c270d85c5431f0f86a6 (patch) | |
tree | ea23b7cf9c983d7f9532fb2e363b69c21ae4b190 | |
parent | 746c4e7b03bee53d5db708dece2b490cc1f84c2b (diff) | |
download | scummvm-rg350-4840b889d7c8d2924f162c270d85c5431f0f86a6.tar.gz scummvm-rg350-4840b889d7c8d2924f162c270d85c5431f0f86a6.tar.bz2 scummvm-rg350-4840b889d7c8d2924f162c270d85c5431f0f86a6.zip |
SCI32: Initialise pointers in CelObj scaler
This ensures that if there is a bug in the drawing code that causes
the row to be unset, it will not result in silently reading garbage
out of random memory.
CID 1354802
-rw-r--r-- | engines/sci/graphics/celobj32.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/graphics/celobj32.cpp b/engines/sci/graphics/celobj32.cpp index 3e09d0f495..da00a5e17c 100644 --- a/engines/sci/graphics/celobj32.cpp +++ b/engines/sci/graphics/celobj32.cpp @@ -120,6 +120,7 @@ struct SCALER_NoScale { const int16 _sourceY; SCALER_NoScale(const CelObj &celObj, const int16 maxWidth, const Common::Point &scaledPosition) : + _row(nullptr), _reader(celObj, FLIP ? celObj._width : maxWidth), _lastIndex(celObj._width - 1), _sourceX(scaledPosition.x), @@ -166,6 +167,7 @@ struct SCALER_Scale { static int16 _valuesY[1024]; SCALER_Scale(const CelObj &celObj, const Common::Rect &targetRect, const Common::Point &scaledPosition, const Ratio scaleX, const Ratio scaleY) : + _row(nullptr), #ifndef NDEBUG _maxX(targetRect.right - 1), #endif |