From 8a0b074f39a2c91003f5e80231a7998fbf24d1b7 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 16 Mar 2010 19:56:33 +0100 Subject: [PATCH] Fix combining characters messing with width counter --- term/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term/serial.c b/term/serial.c index 666606fcc..b1c5accd1 100644 --- a/term/serial.c +++ b/term/serial.c @@ -348,7 +348,7 @@ grub_serial_putchar (const struct grub_unicode_glyph *c) default: if ((c->base & 0xC0) == 0x80) break; - if (xpos >= TEXT_WIDTH) + if (xpos + c->estimated_width >= TEXT_WIDTH + 1) { xpos = 0; if (ypos < TEXT_HEIGHT - 1)