Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed X11 mode line crash with only one video mode (thanks Alan!)
  • Loading branch information
slouken committed Sep 5, 2003
1 parent 54cf62e commit c488966
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/x11/SDL_x11modes.c
Expand Up @@ -120,7 +120,7 @@ static void set_best_resolution(_THIS, int width, int height)
goto match;
}
qsort(modes, nmodes, sizeof *modes, cmpmodes);
for ( i = nmodes-1; i >= 0 ; i-- ) {
for ( i = nmodes-1; i > 0 ; i-- ) {
if ( ! best_width ) {
if ( (modes[i]->hdisplay >= width) &&
(modes[i]->vdisplay >= height) ) {
Expand Down

0 comments on commit c488966

Please sign in to comment.