Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed crash on 64-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 3, 2008
1 parent 8bbb116 commit 9f495a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/video/SDL_blit_copy.c
Expand Up @@ -106,7 +106,9 @@ SDL_BlitCopy(SDL_BlitInfo * info)
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;
Expand All @@ -117,7 +119,9 @@ SDL_BlitCopy(SDL_BlitInfo * info)
#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;
Expand Down

0 comments on commit 9f495a3

Please sign in to comment.