From 55c67005a638989fdc3e9cbe03d84ed0ff975051 Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Fri, 16 Jun 2017 15:16:08 +0200 Subject: SUPERNOVA: Returns if section is invalid Sections with an x2 value of 0 cannot span any area and are thus invalid --- engines/supernova/graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3