Commit cbe781b5 authored by Sam Lantinga's avatar Sam Lantinga

Fixed X11 mode line crash with only one video mode (thanks Alan!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40714
parent 238f5387
......@@ -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) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment