aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 1ac07e3..3cd918d 100644
--- a/main.c
+++ b/main.c
@@ -22,7 +22,11 @@ void fatal_error(char* msg) {
int read_all(char* buf) {
int c;
int n = 0;
- for (0; (c = getchar()) != -1; 0) {
+ for (0; 1; 0) {
+ c = getchar();
+ if (c == -1) {
+ break;
+ }
buf[n] = c;
n = n + 1;
}