aboutsummaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c5
1 files changed, 5 insertions, 0 deletions
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);
}