+2013-10-26 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/normal/menu_entry.c (get_logical_num_lines): Use unsigned
+ division as the one making more sense.
+ (update_screen): Likewise.
+ (complete): Likewise.
+
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/menu_entry.c (complete): Make sure that width is >0.
{
return (grub_getstringwidth (linep->buf, linep->buf + linep->len,
term_screen->term)
- / term_screen->geo.entry_width) + 1;
+ / (unsigned) term_screen->geo.entry_width) + 1;
}
static void
linep = screen->lines + screen->line;
grub_size_t t = grub_getstringwidth (linep->buf, linep->buf + screen->column,
term_screen->term);
- y += t / term_screen->geo.entry_width;
- if (t % term_screen->geo.entry_width == 0
+ y += t / (unsigned) term_screen->geo.entry_width;
+ if (t % (unsigned) term_screen->geo.entry_width == 0
&& t != 0 && screen->column == linep->len)
y--;
/* Check if scrolling is necessary. */
grub_puts_terminal ("\n ", screen->terms[i].term);
}
- p += (count % num_sections) * width;
+ p += ((unsigned) count % num_sections) * width;
endp = p + width;
if (p != ucs4)