ansilove

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

commit a257a49c4b32daa7bccfa14c41a8dd80fb87beb8
parent a0302a28f1092c02617c17af09e9209860c02572
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon,  9 Dec 2019 22:44:58 +0100

Do not call sauceReadFileName() a second time, read from existing SAUCE record.

Diffstat:
Msrc/ansilove.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -224,10 +224,8 @@ main(int argc, char *argv[]) errx(EXIT_FAILURE, "%s", ansilove_error(&ctx)); /* adjust the file size if file contains a SAUCE record */ - if (fileHasSAUCE) { - sauce *saucerec = sauceReadFileName(input); - ctx.length -= 129 - (saucerec->comments > 0 ? 5 + 64 * saucerec->comments : 0); - } + if (fileHasSAUCE) + ctx.length -= 129 - (record->comments > 0 ? 5 + 64 * record->comments : 0); int (*loader)(struct ansilove_ctx *, struct ansilove_options *);