From 0685c1ce85218184657f931e5cfcb587fd3ee82f Mon Sep 17 00:00:00 2001 From: J08nY Date: Wed, 30 Aug 2017 17:17:01 +0200 Subject: Fix input_quit closing stdin. --- src/io/input.c | 2 +- test/src/io/test_input.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 test/src/io/test_input.c diff --git a/src/io/input.c b/src/io/input.c index 726b710..06771b1 100644 --- a/src/io/input.c +++ b/src/io/input.c @@ -110,7 +110,7 @@ bool input_init(const config_t *cfg) { } void input_quit(void) { - if (in != NULL && in != stdout) { + if (in != NULL && in != stdin) { fclose(in); } } diff --git a/test/src/io/test_input.c b/test/src/io/test_input.c new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/test/src/io/test_input.c @@ -0,0 +1 @@ + -- cgit v1.3.1