ansilove

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

commit 54dc52fb9bf775b41191a277787110ac2bfc7730
parent 0ecb0167a8b0dbc4c0649ff634d92962b3da878e
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 25 Jun 2019 14:33:21 +0200

Fix the check for readComments() return value.

Due to an incorrectly positioned close bracket, we were instead passing
a boolean to the readComments() function.

Pointed out by Andy Herbert, thanks!

Diffstat:
Msrc/sauce.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sauce.c b/src/sauce.c @@ -91,7 +91,7 @@ readRecord(FILE *file, sauce *record) record->comment_lines = malloc(record->comments *sizeof (*record->comment_lines)); if (record->comment_lines != NULL) { - if (readComments(file, record->comment_lines, record->comments != 0)) { + if (readComments(file, record->comment_lines, record->comments) == -1) { record->comments = 0; } } else {