Correctly add leading zeroes to Australia Post symbols

Bug fix by Erik Salaj <eriksalaj@gmail.com>
This commit is contained in:
Robin Stuart 2018-02-03 11:41:35 +00:00
parent 3aeb1ea70a
commit 38150ce931

View File

@ -163,7 +163,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
/* Add leading zeros as required */ /* Add leading zeros as required */
zeroes = 8 - length; zeroes = 8 - length;
memset(localstr, '0', zeroes); memset(localstr, '0', zeroes);
localstr[8] = '\0'; localstr[zeroes] = '\0';
} }
strcat(localstr, (char*) source); strcat(localstr, (char*) source);