summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2014-12-24 16:48:39 -0600
committerNicolas Williams <nico@cryptonector.com>2014-12-24 16:49:55 -0600
commit9e1fd8cf4da04faf1170739923a099e74da61231 (patch)
treeb3c09c270bc23f4e37f9af645de2962f592e6143 /main.c
parenta55085b6620eaadd4c25681c3b744137ba8d30c2 (diff)
Fix infinite loop in read_more() (fix #656)
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 0d32cb0b..2d022bb3 100644
--- a/main.c
+++ b/main.c
@@ -154,7 +154,7 @@ const char** input_filenames = NULL;
int ninput_files;
int next_input_idx;
static int read_more(char* buf, size_t size) {
- while (!current_input || feof(current_input)) {
+ if (!current_input || feof(current_input)) {
if (current_input) {
if (current_input == stdin) {
clearerr(stdin); // perhaps we can read again; anyways, we don't fclose(stdin)