wchar/fgetwc: fix the return value truncate error
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
390275f867
commit
9876b0b615
@ -69,7 +69,8 @@ wint_t fgetwc_unlocked(FAR FILE *f)
|
||||
|
||||
while (l == -2)
|
||||
{
|
||||
b = c = getc_unlocked(f);
|
||||
c = getc_unlocked(f);
|
||||
b = (char)c;
|
||||
if (c < 0)
|
||||
{
|
||||
if (!mbsinit(&st))
|
||||
|
Loading…
Reference in New Issue
Block a user