TELEPEN: fix stop length (14 -> 12)

reedsol.c: some performance gain by stashing generated poly logs and
  pre-checking if has a zero coeff to avoid inner loop branch
This commit is contained in:
gitlost 2021-11-11 13:30:58 +00:00
parent 7e3d0f2405
commit 21d015a84a
4 changed files with 129 additions and 56 deletions

View file

@ -125,8 +125,8 @@ INTERNAL int telepen(struct zint_symbol *symbol, unsigned char source[], int src
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Check digit: %d\n", check_digit);
/* Stop character */
memcpy(d, TeleTable['z'], 14);
d += 14;
memcpy(d, TeleTable['z'], 12);
d += 12;
expand(symbol, dest, d - dest);
@ -210,8 +210,8 @@ INTERNAL int telepen_num(struct zint_symbol *symbol, unsigned char source[], int
if (symbol->debug & ZINT_DEBUG_PRINT) printf("Check digit: %d\n", check_digit);
/* Stop character */
memcpy(d, TeleTable['z'], 14);
d += 14;
memcpy(d, TeleTable['z'], 12);
d += 12;
expand(symbol, dest, d - dest);