]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix various issues in menu editor
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 25 Dec 2009 12:18:08 +0000 (13:18 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 25 Dec 2009 12:18:08 +0000 (13:18 +0100)
normal/menu_entry.c

index 8caba43368223862053b940e0f78e5050dc431c6..9599abd97b294aa41c9dd3e75e00e2a4b5b3b031 100644 (file)
@@ -124,8 +124,7 @@ print_line (struct line *linep, int offset, int start, int y,
   if (linep->len >= offset + grub_term_entry_width (term_screen->term))
     {
       char *p, c;
-      p = linep->buf + offset + start
-       + grub_term_entry_width (term_screen->term);
+      p = linep->buf + offset + grub_term_entry_width (term_screen->term);
       c = *p;
       *p = 0;
       grub_puts_terminal (linep->buf + offset + start, term_screen->term);
@@ -144,7 +143,7 @@ print_line (struct line *linep, int offset, int start, int y,
       *p = c;
 
       for (i = 0;
-          i < grub_term_entry_width (term_screen->term) - linep->len + offset;
+          i <= grub_term_entry_width (term_screen->term) - linep->len + offset;
           i++)
        grub_putcode (' ', term_screen->term);
     }
@@ -1251,6 +1250,7 @@ grub_menu_entry_run (grub_menu_entry_t entry)
     screen->terms[i].term = term;
     screen->terms[i].x = 0;
     screen->terms[i].y = 0;
+    i++;
   }
   /* Draw the screen.  */
   for (i = 0; i < screen->nterms; i++)