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