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 3541

Summary: DisplayIndex out of bounds in SDL_SetWindowPosition
Product: SDL Reporter: Intellectual Kitty <IntellectualKitty>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.5   
Hardware: x86   
OS: Other   

Description Intellectual Kitty 2016-12-31 00:11:49 UTC
In SDL_video.c, on line #1756, in SDL_SetWindowPosition (from today's distribution, 12-30-2016, https://hg.libsdl.org/SDL/shortlog/fe1e3dfa67ef):

        if (displayIndex > _this->num_displays) {

should be:

        if (displayIndex >= _this->num_displays) {
Comment 1 Intellectual Kitty 2016-12-31 00:13:07 UTC
Oops.  Put the wrong date in my previous comment.  It should read 12-31.2016.
Comment 2 Intellectual Kitty 2016-12-31 00:14:05 UTC
Sigh.  My keyboard is out to get me.  12-31-2016.
Comment 3 Sam Lantinga 2016-12-31 18:30:26 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/617f3de85b0a