mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
printf: Fix and test %% behaviour in presence of subsequenbt args.
This commit is contained in:
1 parent
d9a3bfead8
commit
e5c9300191
2 files changed
+10
No files matched your search
@@ -740,6 +740,12 @@ parse_printf_args (const char *fmt0, struct printf_args *args,
|
||||
fmt++;
|
||||
|
||||
c = *fmt++;
|
||||
if (c == '%')
|
||||
{
|
||||
n--;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (c == 'l')
|
||||
{
|
||||
c = *fmt++;
|
||||
@@ -876,6 +882,7 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0,
|
||||
if (c == '%')
|
||||
{
|
||||
write_char (str, &count, max_len,c);
|
||||
n--;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user