aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-01 20:44:58 +0000
committerJohannes Schickel2010-10-01 20:44:58 +0000
commit5541af78b1b3ec506fcdd03c96104c4b10168742 (patch)
tree2794c35167d927524fdc227b916c8955f5080ed1
parent288d09389e358c1e317a7be72486b7ca46a843b7 (diff)
downloadscummvm-rg350-5541af78b1b3ec506fcdd03c96104c4b10168742.tar.gz
scummvm-rg350-5541af78b1b3ec506fcdd03c96104c4b10168742.tar.bz2
scummvm-rg350-5541af78b1b3ec506fcdd03c96104c4b10168742.zip
GRAPHICS: Add BPP check to Surface::move.
svn-id: r52968
-rw-r--r--graphics/surface.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index b704c7fc9c..f06c24c2cd 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -185,6 +185,9 @@ void Surface::move(int dx, int dy, int height) {
if ((dx == 0 && dy == 0) || height <= 0)
return;
+ if (bytesPerPixel != 1 && bytesPerPixel != 2)
+ error("Surface::move: bytesPerPixel must be 1 or 2");
+
byte *src, *dst;
int x, y;