diff options
author | Joseph-Eugene Winzer | 2017-06-16 15:16:08 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-22 23:17:48 +0000 |
commit | 55c67005a638989fdc3e9cbe03d84ed0ff975051 (patch) | |
tree | 3fd1763a9dd5e24b8d362de5cad908ff24349754 /engines | |
parent | 85aa1985ace84d5d3ed939990ea7f22dfdc4b9fb (diff) | |
download | scummvm-rg350-55c67005a638989fdc3e9cbe03d84ed0ff975051.tar.gz scummvm-rg350-55c67005a638989fdc3e9cbe03d84ed0ff975051.tar.bz2 scummvm-rg350-55c67005a638989fdc3e9cbe03d84ed0ff975051.zip |
SUPERNOVA: Returns if section is invalid
Sections with an x2 value of 0 cannot span any area and are thus invalid
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/graphics.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/supernova/graphics.cpp b/engines/supernova/graphics.cpp index b986427986..2abbdb1406 100644 --- a/engines/supernova/graphics.cpp +++ b/engines/supernova/graphics.cpp @@ -112,7 +112,7 @@ bool MSNImageDecoder::loadSection(int section) { if (image < 128) { do { uint32 offset = (_section[image].addressHigh << 16) + _section[image].addressLow; - if (offset == kInvalidAddress) { + if (offset == kInvalidAddress || _section[image].x2 == 0) { return false; } int width = _section[image].x2 - _section[image].x1 + 1; |