Make command line version compile with MS-VC6 and QT-Version with MS-VC8

This commit is contained in:
Harald Oehlmann 2015-08-18 13:50:42 +02:00
parent 2e5fe31ebf
commit b7b7564457
14 changed files with 198 additions and 52 deletions

View file

@ -596,6 +596,9 @@ int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int lengt
int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int length)
{
int error_number, error_buffer, i;
#ifdef _MSC_VER
unsigned char* local_source;
#endif
error_number = 0;
if(length == 0) {
@ -613,7 +616,7 @@ int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int lengt
#ifndef _MSC_VER
unsigned char local_source[length + 1];
#else
unsigned char* local_source = (unsigned char*)_alloca(length + 1);
local_source = (unsigned char*)_alloca(length + 1);
#endif
/* First check the symbology field */