[Scummvm-cvs-logs] SF.net SVN: scummvm: [24452] scummvm/trunk/backends/platform/dc/display.cpp
marcus_c at users.sourceforge.net
marcus_c at users.sourceforge.net
Sun Oct 22 19:32:09 CEST 2006
Revision: 24452
http://svn.sourceforge.net/scummvm/?rev=24452&view=rev
Author: marcus_c
Date: 2006-10-22 10:32:04 -0700 (Sun, 22 Oct 2006)
Log Message:
-----------
Check for degenerated rect in copyRectTo*.
Modified Paths:
--------------
scummvm/trunk/backends/platform/dc/display.cpp
Modified: scummvm/trunk/backends/platform/dc/display.cpp
===================================================================
--- scummvm/trunk/backends/platform/dc/display.cpp 2006-10-22 17:20:07 UTC (rev 24451)
+++ scummvm/trunk/backends/platform/dc/display.cpp 2006-10-22 17:32:04 UTC (rev 24452)
@@ -237,6 +237,8 @@
void OSystem_Dreamcast::copyRectToScreen(const byte *buf, int pitch, int x, int y,
int w, int h)
{
+ if(w<1 || h<1)
+ return;
unsigned char *dst = screen + y*SCREEN_W + x;
do {
memcpy(dst, buf, w);
@@ -568,6 +570,8 @@
void OSystem_Dreamcast::copyRectToOverlay(const int16 *buf, int pitch,
int x, int y, int w, int h)
{
+ if(w<1 || h<1)
+ return;
unsigned short *dst = overlay + y*OVL_W + x;
do {
memcpy(dst, buf, w*sizeof(int16));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list