diff options
Diffstat (limited to 'src/stdio/vfscanf.c')
-rw-r--r-- | src/stdio/vfscanf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stdio/vfscanf.c b/src/stdio/vfscanf.c index 6bea6ad8..bb928480 100644 --- a/src/stdio/vfscanf.c +++ b/src/stdio/vfscanf.c @@ -265,8 +265,10 @@ int vfscanf(FILE *restrict f, const char *restrict fmt, va_list ap) if (size == SIZE_l) *(wchar_t **)dest = wcs; else *(char **)dest = s; } - if (wcs) wcs[i] = 0; - if (s) s[i] = 0; + if (t != 'c') { + if (wcs) wcs[i] = 0; + if (s) s[i] = 0; + } break; case 'p': case 'X': |