changeset 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 8be92df64b22
children dfc1c102e825
files src/video/x11/SDL_x11modes.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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) ) {