Skip to content

Commit

Permalink
* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
Browse files Browse the repository at this point in the history
	outside of range.
  • Loading branch information
phcoder committed Dec 25, 2011
1 parent 4d8c476 commit 63fa8ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
2011-12-25 Vladimir Serbinenko <[email protected]>

Avoid cutting in the middle of UTF-8 string.
* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
outside of range.

2011-12-25 Vladimir Serbinenko <[email protected]>

Avoid cutting in the middle of UTF-8 character.

* include/grub/charset.h (grub_getend): New function.
* grub-core/script/function.c (grub_script_function_find): Use
Expand Down
4 changes: 3 additions & 1 deletion grub-core/term/gfxterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,9 @@ grub_gfxterm_putchar (struct grub_term_output *term,
{
unsigned i;

for (i = 1; i < char_width; i++)
for (i = 1; i < char_width && p + i <
virtual_screen.text_buffer + virtual_screen.columns
* virtual_screen.rows; i++)
{
grub_free (p[i].code);
p[i].code = grub_unicode_glyph_from_code (' ');
Expand Down

0 comments on commit 63fa8ef

Please sign in to comment.