[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.110,2.111
Max Horn
fingolfin at users.sourceforge.net
Tue Sep 28 17:12:44 CEST 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20780
Modified Files:
charset.cpp
Log Message:
Check for negative width/height
Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.110
retrieving revision 2.111
diff -u -d -r2.110 -r2.111
--- charset.cpp 27 Sep 2004 20:42:10 -0000 2.110
+++ charset.cpp 29 Sep 2004 00:04:38 -0000 2.111
@@ -1343,11 +1343,13 @@
}
// Blit the image data
- do {
- memcpy(back, dst, w);
- back += backSurface.pitch;
- dst += dstSurface.pitch;
- } while (--h);
+ if (w > 0) {
+ while (h-- > 0) {
+ memcpy(back, dst, w);
+ back += backSurface.pitch;
+ dst += dstSurface.pitch;
+ }
+ }
}
_left += origWidth;
More information about the Scummvm-git-logs
mailing list