# HG changeset patch # User Sam Lantinga # Date 1062775126 0 # Node ID 7c8deec1659cdba431791db17120aa584fc45a80 # Parent 8be92df64b22e48ece9c0989276ae64e4506d32e Fixed X11 mode line crash with only one video mode (thanks Alan!) diff -r 8be92df64b22 -r 7c8deec1659c src/video/x11/SDL_x11modes.c --- a/src/video/x11/SDL_x11modes.c Wed Sep 03 20:07:16 2003 +0000 +++ b/src/video/x11/SDL_x11modes.c Fri Sep 05 15:18:46 2003 +0000 @@ -120,7 +120,7 @@ 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) ) {