commit ceaa0b5835381a7c9b9b419b9e65c98dfe4e9410
parent 822faedb5d40e3b9f18184863e1a812a82a72dce
Author: Frederic Cambus <fred@statdns.com>
Date: Fri, 25 Sep 2020 23:02:30 +0200
Remove the current_character variable, we use a cursor now.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c
@@ -86,7 +86,7 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
size_t loop = 0, ansi_sequence_loop;
/* character definitions */
- uint8_t current_character, character;
+ uint8_t character;
uint8_t *cursor, state = STATE_TEXT;
uint8_t ansi_sequence_character;
@@ -118,7 +118,6 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
/* ANSi interpreter */
while (loop < ctx->length) {
- current_character = ctx->buffer[loop];
cursor = &ctx->buffer[loop];
if (column == options->columns) {
@@ -182,7 +181,7 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
ansi_buffer[structIndex].foreground =
foreground24 ? foreground24 : foreground;
}
- ansi_buffer[structIndex].character = current_character;
+ ansi_buffer[structIndex].character = *cursor;
ansi_buffer[structIndex].column = column;
ansi_buffer[structIndex].row = row;