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 - revcpy does not work on non-x86 platforms.
Summary: revcpy does not work on non-x86 platforms.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: main (show other bugs)
Version: HG 1.2
Hardware: x86 Linux
: P1 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-28 07:56 UTC by Emmanuel Jeandel
Modified: 2007-06-04 04:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.