grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

normal/cmdline bug & patch


From: Tomas Ebenlendr
Subject: normal/cmdline bug & patch
Date: Tue, 15 Jun 2004 13:31:03 +0200
User-agent: Mutt/1.5.6i

My grub sumetimes prevent to boot / unload normal mode. Here is patch
after 2 days work. (I made grub to log to LPT, this can bochs save to
file, it is not clean patch, so I don't post it here.)

Here is bugfix:

"hist_end - i" cannot be greater than hist_size, but it can be smaller
than zero

--- grub2_x/normal/cmdline.c    2004-06-05 00:20:18.000000000 +0200
+++ grub2_patched/normal/cmdline.c      2004-06-15 13:18:59.000000000 +0200
@@ -55,8 +55,8 @@
          for (i = 0; i < delsize; i++)
            {
              int pos = hist_end - i;
-             if (pos > hist_size)
-               pos -= hist_size;
+             if (pos < hist_size)
+               pos += hist_size;
              grub_free (old_hist_lines[pos]);
            }
 
-- 
                                 Tomas 'ebi' Ebenlendr
                                 http://get.to/ebik
                                 PF 2004.45508177747





reply via email to

[Prev in Thread] Current Thread [Next in Thread]