diff src/video/x11/SDL_x11modes.c @ 713:7c8deec1659c

Fixed X11 mode line crash with only one video mode (thanks Alan!)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 05 Sep 2003 15:18:46 +0000
parents df178851293b
children b8d311d90021
line wrap: on
line diff
--- 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) ) {