Fix failing printf test.
* grub-core/kern/misc.c (grub_vsnprintf_real): Parse '-', '.', and '$' in the correct order when collecting type information.
This commit is contained in:
parent
971dd2c6d5
commit
45d26abb40
2 changed files with 19 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
|||
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
|
||||
|
|
|
@ -741,23 +741,26 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a
|
|||
if (*fmt && *fmt =='-')
|
||||
fmt++;
|
||||
|
||||
while (*fmt && grub_isdigit (*fmt))
|
||||
fmt++;
|
||||
|
||||
if (*fmt && *fmt =='.')
|
||||
fmt++;
|
||||
|
||||
while (*fmt && grub_isdigit (*fmt))
|
||||
fmt++;
|
||||
|
||||
p = fmt;
|
||||
|
||||
while (*fmt && grub_isdigit (*fmt))
|
||||
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++;
|
||||
|
||||
|
|
Loading…
Reference in a new issue