On Mon, 24 Feb 2014 17:05:46 -0500, Andrei Alexandrescu <[email protected]> wrote:

What's the matter with http://dpaste.dzfl.pl/ebd6ba43823f?

This is what happens when you close input (i.e. hit ctrl-d from a console), without entering -1.

readf is returning 0 meaning "I didn't get anything" and the code is ignoring it.

I changed it to:

if(readf("%s\n", &input) == 0)
            break;

And it works fine. Note I had to add \n to the readf to use a one-number-per-line style (didn't make sense otherwise).

-Steve

Reply via email to