mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
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)
|
||||
{
|
||||
b = c = getc_unlocked(f);
|
||||
c = getc_unlocked(f);
|
||||
b = (char)c;
|
||||
if (c < 0)
|
||||
{
|
||||
if (!mbsinit(&st))
|
||||
|
|
Loading…
Reference in a new issue