about summary refs log tree commit diff
path: root/stdio-common/printf-parse.h
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/printf-parse.h')
-rw-r--r--stdio-common/printf-parse.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/stdio-common/printf-parse.h b/stdio-common/printf-parse.h
index a7960e6003..9a5cfbac7e 100644
--- a/stdio-common/printf-parse.h
+++ b/stdio-common/printf-parse.h
@@ -97,6 +97,8 @@ find_spec (const char *format, mbstate_t *ps)
     {
       int len;
 
+      /* Remove any hints of a wrong encoding.  */
+      ps->count = 0;
       if (isascii (*format) || (len = mbrlen (format, MB_CUR_MAX, ps)) <= 0)
 	++format;
       else