diff options
-rw-r--r-- | listamsb.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -220,6 +220,11 @@ void parse_args(int argc, char **argv) { } if(optind >= argc) { + if(isatty(fileno(stdin))) { + fprintf(stderr, "%s: can't read binary data from a terminal\n", self); + print_help(); + exit(1); + } freopen(NULL, "rb", stdin); infile = stdin; } else { |