From 87d6527628583c355883cc997d54d337abae2a7a Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Thu, 6 Jan 2011 16:49:25 +0000 Subject: 28578: fix handling of numeric escapes that expand to "%" in printf format strings, so they are not treated as format introducers. --- Src/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index a1cac2537..a4cd67812 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1,4 +1,3 @@ - /* * utils.c - miscellaneous utilities * @@ -5523,6 +5522,8 @@ getkeystring(char *s, int *len, int how, int *misc) } *t++ = zstrtol(s + (*s == 'x'), &s, (*s == 'x') ? 16 : 8); + if ((how & GETKEY_PRINTF_PERCENT) && t[-1] == '%') + *t++ = '%'; if (svchar) { u[3] = svchar; svchar = '\0'; -- cgit 1.4.1