input: Reset eof in reset_input

Ensure that the EOF state is reset in reset_input as otherwise
the new stdin may be treated as empty.

Reported-by: Nathan Royce <nroycea+kernel@gmail.com>
Fixes: 69786bc79f9b ("input: Fix pungetc on PEOF")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff --git a/src/input.c b/src/input.c
index 6388b83..1aff3d4 100644
--- a/src/input.c
+++ b/src/input.c
@@ -684,6 +684,7 @@
 
 void reset_input(void)
 {
-	flush_input();
 	stdin_istty = -1;
+	basepf.eof = 0;
+	flush_input();
 }