[Scummvm-cvs-logs] SF.net SVN: scummvm: [24451] scummvm/branches/branch-0-9-0/backends/dc/ display.cpp
marcus_c at users.sourceforge.net
marcus_c at users.sourceforge.net
Sun Oct 22 19:20:11 CEST 2006
Revision: 24451
http://svn.sourceforge.net/scummvm/?rev=24451&view=rev
Author: marcus_c
Date: 2006-10-22 10:20:07 -0700 (Sun, 22 Oct 2006)
Log Message:
-----------
Check for degenerated rect in copyRectTo*.
Modified Paths:
--------------
scummvm/branches/branch-0-9-0/backends/dc/display.cpp
Modified: scummvm/branches/branch-0-9-0/backends/dc/display.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/backends/dc/display.cpp 2006-10-22 16:56:27 UTC (rev 24450)
+++ scummvm/branches/branch-0-9-0/backends/dc/display.cpp 2006-10-22 17:20:07 UTC (rev 24451)
@@ -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