commit f1b7471ba97dbfe7e18869f354ad3c33fda2fdb3
parent eccb4a94114ce2a8bac242c37c48580d4f16ad82
Author: Frederic Cambus <fred@statdns.com>
Date: Thu, 15 Nov 2018 15:46:20 +0100
Fix regression in the ANSI parser
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c
@@ -144,7 +144,7 @@ int ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
case ESC: /* ANSi sequence */
if ((loop+1 < ctx->length) && ctx->buffer[loop + 1] == 91) {
- uint32_t maxlength = fmin(ctx->length - loop, ANSI_SEQUENCE_MAX_LENGTH);
+ uint32_t maxlength = fmin(ctx->length - loop + 1, ANSI_SEQUENCE_MAX_LENGTH);
for (ansi_sequence_loop = 0; ansi_sequence_loop < maxlength; ansi_sequence_loop++) {
ansi_sequence_character = ctx->buffer[loop + 2 + ansi_sequence_loop];