Fix example for GNU/Linux emulation.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2021-02-09 16:38:13 +09:00
parent 7b7335bc5d
commit 66f08d87e4
2 changed files with 11 additions and 1 deletions

View File

@@ -179,7 +179,14 @@ main (int argc, const char *argv[])
if (size < 0)
goto connection_loop;
if (size == 1)
if (size == 0)
/* Timeout */
{
if (tty_send (tty, "\r\n", 2) < 0)
return 0;
break;
}
else if (size == 1)
/* Do nothing but prompt again. */
break;
else if (size)