Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order) SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Thu, 17 Feb 2011 02:31:50 -0800
branchSDL-1.2
changeset 5334 d898ee5431f5
parent 5316 6bb01861c4c0
child 5392 30e4d724fe98
Fixed bug #1090 (SDL_BlitCopyOverlap() assumes memcpy() operates in order) The much more complete fix is in SDL 1.3, but this is a band-aid that will fix the bug for 1.2.
src/video/SDL_blit.c
--- a/src/video/SDL_blit.c	Wed Feb 16 04:49:07 2011 -0800
+++ b/src/video/SDL_blit.c	Thu Feb 17 02:31:50 2011 -0800
@@ -214,7 +214,7 @@
 	dstskip = w+info->d_skip;
 	if ( dst < src ) {
 		while ( h-- ) {
-			SDL_memcpy(dst, src, w);
+			SDL_memmove(dst, src, w);
 			src += srcskip;
 			dst += dstskip;
 		}