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
@ -384,14 +384,14 @@ int main(int argc, FAR char *argv[])
|
|||||||
{
|
{
|
||||||
int ch = getc(stdin);
|
int ch = getc(stdin);
|
||||||
|
|
||||||
if (nobreak == 1)
|
if (ch < 0)
|
||||||
{
|
{
|
||||||
write(g_cu.outfd, &ch, 1);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch <= 0)
|
if (nobreak == 1)
|
||||||
{
|
{
|
||||||
|
write(g_cu.outfd, &ch, 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user