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 1577 - SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL
Summary: SDL_RenderCopyEx - Runtime check fails when dstrect == NULL and center == NULL
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Windows 7
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 14:00 UTC by michael.ehrmann
Modified: 2012-08-24 07:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michael.ehrmann 2012-08-23 14:00:27 UTC
When dstrect == NULL and center == NULL real_dstrect gets not initialized because of a typo.

I guess that in

SDL_RenderCopyEx(...)
{
...
    if (dstrect) real_dstrect = *dstrect;
    else {
        real_srcrect.x = 0;
        real_srcrect.y = 0;
        real_srcrect.w = renderer->viewport.w;
        real_srcrect.h = renderer->viewport.h;
    }
...
}

real_srcrect should be replace with real_dstrect.
Comment 1 Gabriel Jacobo 2012-08-24 07:58:26 UTC
Fixed, thanks! http://hg.libsdl.org/SDL/rev/3fb0c82693af