tty_stdin_input_thread(): write to pipe only if byte_count > 0.

This commit is contained in:
HiFiPhile 2023-09-14 00:06:46 +02:00
parent c01baca157
commit d9dc1ff698

View file

@ -349,7 +349,7 @@ void *tty_stdin_input_thread(void *arg)
}
// Write all bytes read to pipe
while (byte_count)
while (byte_count > 0)
{
bytes_written = write(pipefd[1], input_buffer, byte_count);
if (bytes_written < 0)