diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2010-11-28 21:09:47 +0100 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2010-11-28 21:09:47 +0100 |
commit | 57f6cce72c889f2e7b342e87a565a064320a6ee2 (patch) | |
tree | 5466406472918d3adb63398f5fb9ea1511a5e73f /libc/misc/wchar/wchar.c | |
parent | 4ec89b87bc0eea8d9ca6b50564d12eeb3b1b0119 (diff) | |
parent | 5dea871ac73ef4608022c058b50adc946917f9b9 (diff) |
Merge commit 'origin/master' into prelink
Conflicts:
ldso/include/dl-hash.h
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/wchar/wchar.c')
-rw-r--r-- | libc/misc/wchar/wchar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c index 7380ac9ae..ab6c617ed 100644 --- a/libc/misc/wchar/wchar.c +++ b/libc/misc/wchar/wchar.c @@ -286,6 +286,8 @@ size_t mbrtowc(wchar_t *__restrict pwc, const char *__restrict s, s = empty_string; n = 1; } else if (*s == '\0') { + if (pwc) + *pwc = '\0'; /* According to the ISO C 89 standard this is the expected behaviour. */ return 0; } else if (!n) { |