ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit b3980facdc2471c40b411e3d2b9e3d5f4e3d941c
parent 613959a3dc65ea76e350dceeae5c48c48bbb8801
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 22 Jul 2016 12:39:53 +0200

Adjust the file size if file contains a SAUCE record

Diffstat:
Msrc/main.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -306,6 +306,12 @@ int main(int argc, char *argv[]) { fputs ("\nReading error.\n\n", stderr); exit (3); } // whole file is now loaded into input_file_buffer + // adjust the file size if file contains a SAUCE record + if(fileHasSAUCE) { + sauce *saucerec = sauceReadFile(input_file); + input_file_size -= 129 - ( saucerec->comments > 0 ? 5 + 64 * saucerec->comments : 0); + } + // close input file, we don't need it anymore fclose(input_file);