From 55b33cfb8810722937b3545142799d01a6d67752 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sun, 19 Jun 2016 09:07:50 +0100 Subject: [PATCH] Han Xin: Comment possible errors in AIMD-015 --- backend/hanxin.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/hanxin.c b/backend/hanxin.c index 9fc7580b..0f58dc48 100644 --- a/backend/hanxin.c +++ b/backend/hanxin.c @@ -378,7 +378,7 @@ void calculate_binary(char binary[], char mode[], int source[], int length) { } if (debug) { - printf("0x%4X (%d)", encoding_value, encoding_value); + printf("0x%4x (%d)", encoding_value, encoding_value); } i += count; @@ -626,7 +626,8 @@ void calculate_binary(char binary[], char mode[], int source[], int length) { } /* Terminator */ - strcat(binary, "111111111111"); + strcat(binary, "111111111111111"); + /* Terminator sequence of length 12 is assumed to be a mistake */ if (debug) { printf("\n"); @@ -1130,6 +1131,11 @@ int hx_evaluate(unsigned char *eval, int size, int pattern) { } /* Test 2: Adjacent modules in row/column in same colour */ + /* In AIMD-15 section 5.8.3.2 it is stated... “In Table 9 below, i refers to the row + * position of the module.” - however i being the length of the run of the + * same colour (i.e. "block" below) in the same fashion as ISO/IEC 18004 + * makes more sense. The implementation below matches AIMD-015.*/ + /* Vertical */ for (x = 0; x < size; x++) { state = local[x];