Check for negative source rectangle in SDL_SoftBlit() (thanks John!)
authorSam Lantinga <slouken@libsdl.org>
Tue, 30 Jul 2013 20:57:26 -0700
changeset 7549 c0a35efb1813
parent 7548 66f9d44f9717
child 7550 ff3e041c27f3
Check for negative source rectangle in SDL_SoftBlit() (thanks John!)
src/video/SDL_blit.c
--- a/src/video/SDL_blit.c	Tue Jul 30 23:24:23 2013 +0200
+++ b/src/video/SDL_blit.c	Tue Jul 30 20:57:26 2013 -0700
@@ -61,7 +61,7 @@
     }
 
     /* Set up source and destination buffer pointers, and BLIT! */
-    if (okay && srcrect->w && srcrect->h) {
+    if (okay && !SDL_RectEmpty(srcrect)) {
         SDL_BlitFunc RunBlit;
         SDL_BlitInfo *info = &src->map->info;