We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 424

Summary: revcpy does not work on non-x86 platforms.
Product: SDL Reporter: Emmanuel Jeandel <ejeandel>
Component: mainAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P1    
Version: HG 1.2   
Hardware: x86   
OS: Linux   

Description Emmanuel Jeandel 2007-04-28 07:56:46 UTC
If I am not mistaken, SDL_revcpy (stdlib/SDL_string) should read

    srcp += len-1;
    dstp += len-1;
    while (len--) {
        *dstp-- = *srcp--;
    }
rather than
   srcp += len;
    dstp += len;
    while (len--) {
        *dstp-- = *srcp--;
    }
as it is in the current version.
Indeed, in the current version, revcpy copies from srcp+len to scrp+1 rather than from srcp+len-1 to srcp.

(x86 versions are not affected as they use an assembler code)
Comment 1 Ryan C. Gordon 2007-06-02 13:59:02 UTC
Bumping a bunch of bugs to Priority 1 for consideration for the 1.2.12 release.

--ryan.

Comment 2 Ryan C. Gordon 2007-06-04 04:45:57 UTC
Good catch!

Fixed in svn revision #3048 for the 1.2 branch, and #3049 for the 1.3 branch.

Thanks,
--ryan.