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 5334d898ee5431f5
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
     1.1 --- a/src/video/SDL_blit.c	Wed Feb 16 04:49:07 2011 -0800
     1.2 +++ b/src/video/SDL_blit.c	Thu Feb 17 02:31:50 2011 -0800
     1.3 @@ -214,7 +214,7 @@
     1.4  	dstskip = w+info->d_skip;
     1.5  	if ( dst < src ) {
     1.6  		while ( h-- ) {
     1.7 -			SDL_memcpy(dst, src, w);
     1.8 +			SDL_memmove(dst, src, w);
     1.9  			src += srcskip;
    1.10  			dst += dstskip;
    1.11  		}