* grub-core/kern/misc.c (grub_vsnprintf_real): Parse '-', '.', and
'$' in the correct order when collecting type information.
+2013-01-02 Colin Watson <cjwatson@ubuntu.com>
+
+ Fix failing printf test.
+
+ * grub-core/kern/misc.c (grub_vsnprintf_real): Parse '-', '.', and
+ '$' in the correct order when collecting type information.
+
2013-01-02 Colin Watson <cjwatson@ubuntu.com>
* docs/grub.texi (configfile): Explain environment variable
if (*fmt && *fmt =='-')
fmt++;
- while (*fmt && grub_isdigit (*fmt))
- fmt++;
-
- if (*fmt && *fmt =='.')
- fmt++;
+ p = fmt;
while (*fmt && grub_isdigit (*fmt))
fmt++;
- p = fmt;
-
if (*fmt && *fmt == '$')
{
curn = grub_strtoull (p, 0, 10) - 1;
fmt++;
}
+ if (*fmt && *fmt =='-')
+ fmt++;
+
+ while (*fmt && grub_isdigit (*fmt))
+ fmt++;
+
+ if (*fmt && *fmt =='.')
+ fmt++;
+
while (*fmt && grub_isdigit (*fmt))
fmt++;