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 - DisplayIndex out of bounds in SDL_SetWindowPosition
Summary: DisplayIndex out of bounds in SDL_SetWindowPosition
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86 Other
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-31 00:11 UTC by Intellectual Kitty
Modified: 2016-12-31 18:30 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 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