From 1155683be1ba4cb137252db5eadff74e1b9f072f Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sat, 26 Nov 2016 08:44:59 +0000 Subject: [PATCH] Include last input character in look ahead test Bug and patch by brunt, ticket #43 --- backend/dmatrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/dmatrix.c b/backend/dmatrix.c index b4aba235..8f49854b 100644 --- a/backend/dmatrix.c +++ b/backend/dmatrix.c @@ -341,7 +341,7 @@ static int look_ahead_test(const unsigned char inputData[], const int sourcelen, sp = position; do { - if (sp == (sourcelen - 1)) { + if (sp == sourcelen) { /* At the end of data ... step (k) */ ascii_count = ceilf(ascii_count); b256_count = ceilf(b256_count);