mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system/cu: Echo NULL char too
since zero is also a valid character Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
5018ee264c
commit
e4b101d2ef
1 changed files with 3 additions and 3 deletions
|
|
@ -384,14 +384,14 @@ int main(int argc, FAR char *argv[])
|
|||
{
|
||||
int ch = getc(stdin);
|
||||
|
||||
if (nobreak == 1)
|
||||
if (ch < 0)
|
||||
{
|
||||
write(g_cu.outfd, &ch, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ch <= 0)
|
||||
if (nobreak == 1)
|
||||
{
|
||||
write(g_cu.outfd, &ch, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue