Fixed X11 mode line crash with only one video mode (thanks Alan!)
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40714
This commit is contained in:
parent
238f53877d
commit
cbe781b5ab
1 changed files with 1 additions and 1 deletions
|
@ -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) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue