diff options
Diffstat (limited to 'stdlib/mbtowc.c')
-rw-r--r-- | stdlib/mbtowc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stdlib/mbtowc.c b/stdlib/mbtowc.c index 51fd9ab8f2..744b2b6c0b 100644 --- a/stdlib/mbtowc.c +++ b/stdlib/mbtowc.c @@ -44,14 +44,16 @@ mbtowc (wchar_t *pwc, const char *s, size_t n) not. */ if (s == NULL) { - /* Make sure we use the correct value. */ - update_conversion_ptrs (); + const struct gconv_fcts *fcts; + + /* Get the conversion functions. */ + fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE)); /* This is an extension in the Unix standard which does not directly violate ISO C. */ memset (&__no_r_state, '\0', sizeof __no_r_state); - result = __wcsmbs_gconv_fcts.towc->__stateful; + result = fcts->towc->__stateful; } else if (*s == '\0') { |