From ecd2e0f3a04066abd0c4ca332c4d078f06d3b4b5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 27 Jan 2011 20:38:58 +0000 Subject: GOB: Add sanity checks to Pixel and ConstPixel svn-id: r55571 --- engines/gob/surface.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/gob/surface.h') diff --git a/engines/gob/surface.h b/engines/gob/surface.h index 89e91975a2..b8426989f3 100644 --- a/engines/gob/surface.h +++ b/engines/gob/surface.h @@ -35,7 +35,7 @@ namespace Gob { /** An iterator over a surface's image data, automatically handles different color depths. */ class Pixel { public: - Pixel(byte *vidMem, uint8 bpp); + Pixel(byte *vidMem, uint8 bpp, byte *min, byte *max); Pixel &operator++(); Pixel operator++(int x); @@ -51,13 +51,14 @@ public: private: byte *_vidMem; + byte *_min, *_max; uint8 _bpp; }; /** A const iterator over a surface's image data, automatically handles different color depths. */ class ConstPixel { public: - ConstPixel(const byte *vidMem, uint8 bpp); + ConstPixel(const byte *vidMem, uint8 bpp, const byte *min, const byte *max); ConstPixel &operator++(); ConstPixel operator++(int x); @@ -72,6 +73,7 @@ public: private: const byte *_vidMem; + const byte *_min, *_max; uint8 _bpp; }; -- cgit v1.2.3