mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-27 17:49:23 +00:00
term.h: Avoid returining 0-sized terminal as it may lead to division by zero.
This commit is contained in:
1 parent
475bffeae6
commit
1b6aaddc45
2 files changed
+7
-2
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user