Skip to content

Commit 47a4c85

Browse files
committed
Fix last line check for logger
1 parent 28bd6ca commit 47a4c85

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

common/src/logger.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,10 @@ impl Logger {
103103
if self.x_pos >= self.width() {
104104
self.newline();
105105
}
106-
const BITMAP_LETTER_WIDTH: usize =
107-
get_bitmap_width(FontWeight::Regular, BitmapHeight::Size14);
108-
if self.y_pos >= (self.height() - BITMAP_LETTER_WIDTH) {
106+
let bitmap_char = get_bitmap(c, FontWeight::Regular, BitmapHeight::Size14).unwrap();
107+
if self.y_pos >= (self.height() - bitmap_char.height()) {
109108
self.clear();
110109
}
111-
let bitmap_char = get_bitmap(c, FontWeight::Regular, BitmapHeight::Size14).unwrap();
112110
self.write_rendered_char(bitmap_char);
113111
}
114112
}

0 commit comments

Comments
 (0)