diff --git a/ChangeLog b/ChangeLog index 41613eec0..719265ab4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-04 Vladimir Serbinenko + + * 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 * util/grub-reboot.in (usage): Mention id posibility. diff --git a/grub-core/normal/charset.c b/grub-core/normal/charset.c index 5e5e5eaeb..481e081ec 100644 --- a/grub-core/normal/charset.c +++ b/grub-core/normal/charset.c @@ -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);