SDL_memcpyMMX(): Make sure srcskip and dstskip are 8-byte aligned.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 29 Oct 2011 01:03:50 -0400
changeset 6033 8788e295d3c8
parent 6032 aa31cad2451f
child 6034 e228e94fef7f
SDL_memcpyMMX(): Make sure srcskip and dstskip are 8-byte aligned. Thanks to Patrick Baggett for the fix!
src/video/SDL_blit_copy.c
--- a/src/video/SDL_blit_copy.c	Sat Oct 29 00:57:45 2011 -0400
+++ b/src/video/SDL_blit_copy.c	Sat Oct 29 01:03:50 2011 -0400
@@ -127,7 +127,7 @@
 #endif
 
 #ifdef __MMX__
-    if (SDL_HasMMX()) {
+    if (SDL_HasMMX() && !(srcskip & 7) && !(dstskip & 7)) {
         while (h--) {
             SDL_memcpyMMX(dst, src, w);
             src += srcskip;