diff options
| -rw-r--r-- | CHANGES.txt | 3 | ||||
| -rw-r--r-- | src/extract.c | 13 |
2 files changed, 12 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 2aa7862..3d33ba7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +0.4.1: +- unalf won't print unprintable characters in error messages. + 0.4.0: - alf and unalf now detect duplicate Atari filenames. - alf lets the user set the archive filename for each file (file=FILE, e.g.) diff --git a/src/extract.c b/src/extract.c index a604805..02bd81c 100644 --- a/src/extract.c +++ b/src/extract.c @@ -185,9 +185,12 @@ void extract_alf(void) { new_file = 1; uncrunch_file(); if(bad_checksum) bad_checksum_count++; - if(bytes_written != getquad(alf_hdr_origsize0)) - fprintf(stderr, "%s: %s should be %u bytes, but extracted to %u.\n", - self, out_filename, getquad(alf_hdr_origsize0), bytes_written); + if(bytes_written != getquad(alf_hdr_origsize0)) { + fprintf(stderr, "%s: ", self); + safe_print_filename(out_filename, stderr); + fprintf(stderr, " should be %u bytes, but extracted to %u.\n", + getquad(alf_hdr_origsize0), bytes_written); + } if(!opts.extract_to_stdout) { fclose(out_file); @@ -213,7 +216,9 @@ void extract_alf(void) { void chksum_err(void) { bad_checksum = 1; - fprintf(stderr, "%s: checksum error on %s\n", self, out_filename); + fprintf(stderr, "%s: checksum error on ", self); + safe_print_filename(out_filename, stderr); + fputc('\n', stderr); } void truncated_err(void){ |
