Commit 1b6aaddc authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

term.h: Avoid returining 0-sized terminal as it may lead to division by zero.

parent 475bffea
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/term.h: Avoid returining 0-sized terminal
as it may lead to division by zero.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
 
* grub-core/fs/zfs.c: Avoid divisions by zero.
......@@ -334,12 +334,12 @@ void grub_term_restore_pos (struct grub_term_coordinate *pos);
static inline unsigned grub_term_width (struct grub_term_output *term)
{
return term->getwh(term).x;
return term->getwh(term).x ? : 80;
}
static inline unsigned grub_term_height (struct grub_term_output *term)
{
return term->getwh(term).y;
return term->getwh(term).y ? : 24;
}
static inline struct grub_term_coordinate
......
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