Revision: 2002
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2002
Author: robertmh
Date: 2009-02-27 19:33:38 +0000 (Fri, 27 Feb 2009)
Log Message:
-----------
2009-02-27 Robert Millan <[email protected]>
* kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
`0x' qualifier as 0 when base is specified as parameter).
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/kern/misc.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2009-02-24 13:19:46 UTC (rev 2001)
+++ trunk/grub2/ChangeLog 2009-02-27 19:33:38 UTC (rev 2002)
@@ -1,3 +1,8 @@
+2009-02-27 Robert Millan <[email protected]>
+
+ * 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 <[email protected]>
* configure.ac: Check for -mcmodel=large in x86_64 target.
Modified: trunk/grub2/kern/misc.c
===================================================================
--- trunk/grub2/kern/misc.c 2009-02-24 13:19:46 UTC (rev 2001)
+++ trunk/grub2/kern/misc.c 2009-02-27 19:33:38 UTC (rev 2002)
@@ -438,7 +438,7 @@
/* 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 @@
str += 2;
}
}
- else if (str[1] >= '0' && str[1] <= '7')
+ else if (base == 0 && str[1] >= '0' && str[1] <= '7')
base = 8;
}