diff options
Diffstat (limited to 'src/alf.c')
| -rw-r--r-- | src/alf.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -200,8 +200,9 @@ void crunch_file(const char *filename_arg) { /* read in entire input, couldn't do it this way on the Atari */ input_len = fread(input_buf, 1, MAX_INPUT_SIZE - 1, in_file); - if(!feof(in_file)) { - fprintf(stderr, "%s: %s: this file is too large; only compressing the first 16MB.\n", self, in_filename); + if(input_len == MAX_INPUT_SIZE - 1) { + if(fgetc(in_file) != EOF) + fprintf(stderr, "%s: %s: this file is too large; only compressing the first 16MB.\n", self, in_filename); } if(opt_txtconv) @@ -211,8 +212,6 @@ void crunch_file(const char *filename_arg) { fstat(fileno(in_file), &in_file_stat); /* for timestamp */ fclose(in_file); - memset(output_buf, 0, sizeof(output_buf)); - create_header(); if(opt_verbose) { printf("Crunching %s as %s", in_filename, hdr_filename); |
