]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-02-27 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Fri, 27 Feb 2009 19:33:38 +0000 (19:33 +0000)
committerrobertmh <robertmh@localhost>
Fri, 27 Feb 2009 19:33:38 +0000 (19:33 +0000)
        * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
        `0x' qualifier as 0 when base is specified as parameter).

ChangeLog
kern/misc.c

index f1f95f25c39f7f205c79d66ccdfd44905c26f9af..cbf9a414d4a090c2f3ae0fcf402f71212e9d4b0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-27  Robert Millan  <rmh@aybabtu.com>
+
+       * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
+       `0x' qualifier as 0 when base is specified as parameter).
+
 2009-02-24  Bean  <bean123ch@gmail.com>
 
        * configure.ac: Check for -mcmodel=large in x86_64 target.
index 641bd7aef41f0ba5c8d1aeca69f4d359e6dcce57..23eaa14e39b5ff2529c15c6dcf7d005362f15da3 100644 (file)
@@ -438,7 +438,7 @@ grub_strtoull (const char *str, char **end, int base)
   
   /* Guess the base, if not specified. The prefix `0x' means 16, and
      the prefix `0' means 8.  */
-  if (base == 0 && str[0] == '0')
+  if (str[0] == '0')
     {
       if (str[1] == 'x')
        {
@@ -448,7 +448,7 @@ grub_strtoull (const char *str, char **end, int base)
              str += 2;
            }
        }
-      else if (str[1] >= '0' && str[1] <= '7')
+      else if (base == 0 && str[1] >= '0' && str[1] <= '7')
        base = 8;
     }