diff options
| author | J08nY | 2017-08-30 17:17:01 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-30 17:17:01 +0200 |
| commit | 0685c1ce85218184657f931e5cfcb587fd3ee82f (patch) | |
| tree | ec07187248f2bce1a546189dc74c848a972f0163 | |
| parent | 8d2422ced21f204215a904e1a2f6bfbc143bc894 (diff) | |
| download | ecgen-0685c1ce85218184657f931e5cfcb587fd3ee82f.tar.gz ecgen-0685c1ce85218184657f931e5cfcb587fd3ee82f.tar.zst ecgen-0685c1ce85218184657f931e5cfcb587fd3ee82f.zip | |
Fix input_quit closing stdin.
| -rw-r--r-- | src/io/input.c | 2 | ||||
| -rw-r--r-- | test/src/io/test_input.c | 1 |
2 files changed, 2 insertions, 1 deletions
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 @@ + |
