From d877168b61656f757bde8df4919f91800fa91e6e Mon Sep 17 00:00:00 2001 From: hooper114 Date: Thu, 16 Jul 2009 15:24:46 +0000 Subject: [PATCH] Make Aztec Code MSVC friendly again! --- backend/aztec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/aztec.c b/backend/aztec.c index b6319825..69bded02 100644 --- a/backend/aztec.c +++ b/backend/aztec.c @@ -914,10 +914,10 @@ int aztec(struct zint_symbol *symbol, unsigned char source[]) } #ifndef _MSC_VER - unsigned int data_part[data_blocks], ecc_part[ecc_blocks]; + unsigned int data_part[data_blocks + 3], ecc_part[ecc_blocks + 3]; #else - unsigned int* data_part = (unsigned int*)_alloca(data_blocks * sizeof(unsigned int)); - unsigned int* ecc_part = (unsigned int*)_alloca(ecc_blocks * sizeof(unsigned int)); + unsigned int* data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int)); + unsigned int* ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int)); #endif /* Copy across data into separate integers */ memset(data_part,0,(data_blocks + 2)*sizeof(int));