# HG changeset patch # User Sam Lantinga # Date 1228285924 0 # Node ID cd4a49d5c1bafc135b3d3ed77e01277d6052aec5 # Parent 620a91b6d263adb3289c4abd994e374c1913bf70 Fixed crash on 64-bit systems diff -r 620a91b6d263 -r cd4a49d5c1ba src/video/SDL_blit_copy.c --- a/src/video/SDL_blit_copy.c Wed Dec 03 04:32:24 2008 +0000 +++ b/src/video/SDL_blit_copy.c Wed Dec 03 06:32:04 2008 +0000 @@ -106,7 +106,9 @@ dstskip = info->dst_pitch; #ifdef __SSE__ - if (SDL_HasSSE() && !((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) { + if (SDL_HasSSE() && + !((uintptr_t) src & 15) && !(srcskip & 15) && + !((uintptr_t) dst & 15) && !(dstskip & 15)) { while (h--) { SDL_memcpySSE(dst, src, w); src += srcskip; @@ -117,7 +119,9 @@ #endif #ifdef __MMX__ - if (SDL_HasMMX() && !((uintptr_t) src & 7) && !((uintptr_t) dst & 7)) { + if (SDL_HasMMX() && + !((uintptr_t) src & 7) && !(srcskip & 7) && + !((uintptr_t) dst & 7) && !(dstskip & 7)) { while (h--) { SDL_memcpyMMX(dst, src, w); src += srcskip;