diff options
author | B. Watson <urchlay@slackware.uk> | 2025-02-25 05:46:33 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-02-25 05:46:33 -0500 |
commit | 4b320bdf83d09f7aea1c912a635d87e229ac90cb (patch) | |
tree | 453a6bdc36d5713a4ce588beb7cfa96af51618d4 | |
parent | b889737e9bd8faec9f51dcc78588ff6025449229 (diff) | |
download | bw-atari8-tools-4b320bdf83d09f7aea1c912a635d87e229ac90cb.tar.gz |
listamsb: don't try to read tokenized BASIC from a terminal.
-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 { |