diff --git a/mio/bin/t03.c b/mio/bin/t03.c index 3b1d4d4..2b3729a 100644 --- a/mio/bin/t03.c +++ b/mio/bin/t03.c @@ -155,7 +155,7 @@ int main (int argc, char* argv[]) rem = 0; - while (1) + while (!feof(stdin)) { int x; size_t size = fread(&buf[rem], 1, sizeof(buf) - rem, stdin);