Skip to content

Commit

Permalink
fbcon: Fix typo and bogus logic in get_default_font
Browse files Browse the repository at this point in the history
Reported in: Bugzilla Bug 8727

Fix typo and bogus logic in get_default_font(). The bug results in
get_default_font() returning a font that may not be displayed properly by a
framebuffer driver.

Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
adaplas authored and Linus Torvalds committed Jul 31, 2007
1 parent bb029c6 commit c81f717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/console/fonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ const struct font_desc *get_default_font(int xres, int yres, u32 font_w,
if ((yres < 400) == (f->height <= 8))
c += 1000;

if (!(font_w & (1 << (f->width - 1))) ||
!(font_w & (1 << (f->height - 1))))
if ((font_w & (1 << (f->width - 1))) &&
(font_h & (1 << (f->height - 1))))
c += 1000;

if (c > cc) {
Expand Down

0 comments on commit c81f717

Please sign in to comment.