Mercurial > sdl-ios-xcode
changeset 2826:cd4a49d5c1ba
Fixed crash on 64-bit systems
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 03 Dec 2008 06:32:04 +0000 |
parents | 620a91b6d263 |
children | aec4399c507a |
files | src/video/SDL_blit_copy.c |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;