From 1dc44316663887c7f4b29a8ca8f99508605cd607 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 4 Mar 2025 04:23:15 -0500 Subject: listamsb: tell user where unexpected EOF happened. --- listamsb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3