From 38150ce93134a362ebafac3af51df4cabc381c55 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sat, 3 Feb 2018 11:41:35 +0000 Subject: [PATCH] Correctly add leading zeroes to Australia Post symbols Bug fix by Erik Salaj --- backend/auspost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/auspost.c b/backend/auspost.c index b3f1cbcf..ed44a045 100644 --- a/backend/auspost.c +++ b/backend/auspost.c @@ -163,7 +163,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt /* Add leading zeros as required */ zeroes = 8 - length; memset(localstr, '0', zeroes); - localstr[8] = '\0'; + localstr[zeroes] = '\0'; } strcat(localstr, (char*) source);