mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/normal/menu_entry.c (complete): Make sure that width is >0.
This commit is contained in:
1 parent
a28567364a
commit
5f4028d4a5
2 files changed
+10
-4
No files matched your search
@@ -1,3 +1,7 @@
|
|||||||
|
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/normal/menu_entry.c (complete): Make sure that width is >0.
|
||||||
|
|
||||||
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-10-25 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Make char and string width grub_size_t rather than grub_ssize_t.
|
Make char and string width grub_size_t rather than grub_ssize_t.
|
||||||
|
|||||||
@@ -1029,12 +1029,14 @@ complete (struct screen *screen, int continuous, int update)
|
|||||||
if (restore)
|
if (restore)
|
||||||
for (i = 0; i < screen->nterms; i++)
|
for (i = 0; i < screen->nterms; i++)
|
||||||
{
|
{
|
||||||
int width = grub_term_width (screen->terms[i].term) - 2;
|
unsigned width = grub_term_width (screen->terms[i].term);
|
||||||
|
if (width > 2)
|
||||||
|
width -= 2;
|
||||||
if (width > 15)
|
if (width > 15)
|
||||||
width -= 6;
|
width -= 6;
|
||||||
int num_sections = ((completion_buffer.len
|
unsigned num_sections = ((completion_buffer.len
|
||||||
+ width - 1)
|
+ width - 1)
|
||||||
/ width);
|
/ width);
|
||||||
grub_uint32_t *endp;
|
grub_uint32_t *endp;
|
||||||
struct grub_term_coordinate pos;
|
struct grub_term_coordinate pos;
|
||||||
grub_uint32_t *p = ucs4;
|
grub_uint32_t *p = ucs4;
|
||||||
|
|||||||
Reference in new issue
Block a user