From 31180e79813f5e654a7b2ca7d740074d8e99d1d2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 16 Nov 2007 23:39:14 +0000 Subject: Added assert for bit depth in Surface::move. svn-id: r29522 --- graphics/surface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/graphics/surface.cpp b/graphics/surface.cpp index 290bef6263..bc815c360f 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -163,6 +163,9 @@ void Surface::frameRect(const Common::Rect &r, uint32 color) { // to support 16bpp (or marked as just working for 8bpp // surfaces). void Surface::move(int dx, int dy, int height) { + // This function currently just works with 8bpp surfaces + assert(bytesPerPixel == 1); + // Short circuit check - do we have to do anything anyway? if ((dx == 0 && dy == 0) || height <= 0) return; -- cgit v1.2.3