diff options
| -rw-r--r-- | engines/sci/graphics/remap32.h | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sci/graphics/remap32.h b/engines/sci/graphics/remap32.h index 5f629d733e..1b9628c7be 100644 --- a/engines/sci/graphics/remap32.h +++ b/engines/sci/graphics/remap32.h @@ -325,7 +325,12 @@ public:  	 */  	inline bool remapEnabled(uint8 color) const {  		const uint8 index = _remapEndColor - color; -		assert(index < _remaps.size()); +		// At least KQ7 DOS uses remap colors that are outside the valid remap +		// range; in these cases, just treat those pixels as skip pixels (which +		// is how they would be treated in SSCI) +		if (index >= _remaps.size()) { +			return false; +		}  		return (_remaps[index]._type != kRemapNone);  	}  | 
