summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/vfscanf.c')
-rw-r--r--newlib/libc/stdio/vfscanf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
index e2e08db0e..544d8db7f 100644
--- a/newlib/libc/stdio/vfscanf.c
+++ b/newlib/libc/stdio/vfscanf.c
@@ -508,8 +508,7 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
#ifndef _MB_CAPABLE
wc = *fmt;
#else
- nbytes = __mbtowc (rptr, &wc, (char *) fmt, MB_CUR_MAX,
- __locale_charset (), &state);
+ nbytes = __MBTOWC (rptr, &wc, (char *) fmt, MB_CUR_MAX, &state);
if (nbytes < 0) {
wc = 0xFFFD; /* Unicode replacement character */
nbytes = 1;