aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-04 04:23:15 -0500
committerB. Watson <urchlay@slackware.uk>2025-03-04 04:23:15 -0500
commit1dc44316663887c7f4b29a8ca8f99508605cd607 (patch)
tree8509ef1b927e42ecac22df6654e39955348cbe4e
parent51245d31bd6b9015d1a54797a668dbdb810eaef3 (diff)
downloadbw-atari8-tools-1dc44316663887c7f4b29a8ca8f99508605cd607.tar.gz
listamsb: tell user where unexpected EOF happened.
-rw-r--r--listamsb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/listamsb.c b/listamsb.c
index 8e7d7ea..36e1ac2 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -186,7 +186,8 @@ unsigned char read_byte(void) {
c = fgetc(infile);
- if(c < 0) die("unexpected EOF, file truncated?");
+ if(c < 0) die("unexpected EOF in %s (byte %d), file truncated?",
+ (header_read ? "program" : "header"), bytes_read);
bytes_read++;
return (unsigned char)c;