diff options
Diffstat (limited to 'test-instr.c')
-rw-r--r-- | test-instr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test-instr.c b/test-instr.c index 09a1c9f7..1b978c55 100644 --- a/test-instr.c +++ b/test-instr.c @@ -22,15 +22,17 @@ int main(int argc, char** argv) { char buf[8]; - if (read(0, buf, 8) < 1) { + if (read(0, buf, sizeof(buf)) < 1) { printf("Hum?\n"); exit(1); } if (buf[0] == '0') printf("Looks like a zero to me!\n"); + else if (buf[0] == '1') + printf("Pretty sure that is a one!\n"); else - printf("A non-zero value? How quaint!\n"); + printf("Neither one or zero? How quaint!\n"); exit(0); |