From 44541066424e2ff1490f25a2b512a1a609506243 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 21 Nov 2025 05:20:35 -0500 Subject: Complain if extracted file size doesn't match orig size in ALF header. --- src/io.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/io.c') diff --git a/src/io.c b/src/io.c index 9a3f97d..9b664d4 100644 --- a/src/io.c +++ b/src/io.c @@ -142,5 +142,10 @@ void writeblock(void) { // fprintf(stderr, "writeblock, bufadr = $%04x, len = $%04x\n", bufadr, len); bytes = fwrite(buf, 1, len, out_file); + if(bytes < 0) { + perror(self); /* TODO: out_filename */ + exit(1); + } + bytes_written += bytes; dpoke(buf_len_l, bytes); } -- cgit v1.2.3