libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit 2c1e1c1082162af7ef875e07b81b79474f273760
parent be177d7a5fe3ed06f7cdebeb5133905b8f0ddadf
Author: Frederic Cambus <fred@statdns.com>
Date:   Sun, 24 Apr 2022 23:13:48 +0200

Move a comment to the right place, minor formatting fix.

Diffstat:
Msrc/loaders/ansi.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c @@ -180,13 +180,11 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) if (row > rowMax) rowMax = row; - /* write current character in ansiChar structure */ /* reallocate structure array memory */ if (structIndex == ansi_buffer_size) { ansi_buffer_size += ANSI_BUFFER_SIZE; ptr = reallocarray(ansi_buffer, ansi_buffer_size, sizeof(struct ansiChar)); - if (ptr == NULL) { ctx->error = ANSILOVE_MEMORY_ERROR; goto error; @@ -195,6 +193,7 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options) ansi_buffer = ptr; } + /* write current character in ansiChar structure */ if (invert) { ansi_buffer[structIndex].background = foreground % 8; ansi_buffer[structIndex].foreground = background + (foreground & 8);