提交 c81f717c 编写于 作者: A Antonino A. Daplas 提交者: Linus Torvalds

fbcon: Fix typo and bogus logic in get_default_font

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: NAntonino Daplas <adaplas@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 bb029c67
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册