* grub-core/normal/charset.c (bidi_line_wrap): Fix a spurious warning

and fix a case when line_start overflows.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-05 01:26:29 +01:00
parent 32bd735bd6
commit 24539abdb1
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-03-04 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/charset.c (bidi_line_wrap): Fix a spurious warning
and fix a case when line_start overflows.
2012-03-04 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-reboot.in (usage): Mention id posibility.

View file

@ -633,7 +633,7 @@ bidi_line_wrap (struct grub_unicode_glyph *visual_out,
{
int right_join = 0;
signed i;
for (i = k - 1; i > (signed) line_start - 1 && i >= 0;
for (i = k - 1; i >= 0 && (unsigned) i >= line_start;
i--)
{
enum grub_join_type join_type = get_join_type (visual[i].base);