Bugfix: Ouput binding in raster images

Also: tidy up use of output_options
This commit is contained in:
Robin Stuart 2016-08-26 15:13:40 +01:00
parent 747faf85ed
commit 3cf8a142b8
10 changed files with 52 additions and 44 deletions

View file

@ -302,7 +302,7 @@ int seventeen_ten(unsigned char source[], int position, int length) {
* returning the resulting number of codewords (Annex F.II.E)
*/
int ahead_c(unsigned char source[], int position, int length) {
int count = 0;
int count = 0;
int i;
for (i = position; (i < length) && datum_c(source, i, length); i += 2) {
@ -327,7 +327,7 @@ int try_c(unsigned char source[], int position, int length) {
/* Annex F.II.G */
int ahead_a(unsigned char source[], int position, int length) {
int count = 0;
int count = 0;
int i;
for (i = position; ((i < length) && datum_a(source, i, length))
@ -340,7 +340,7 @@ int ahead_a(unsigned char source[], int position, int length) {
/* Annex F.II.H */
int ahead_b(unsigned char source[], int position, int length) {
int count = 0;
int count = 0;
int i;
for (i = position; ((i < length) && datum_b(source, i, length))
@ -1050,8 +1050,8 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
unsigned char codeword_array[length * 3];
unsigned char masked_codeword_array[length * 3];
#else
char* dot_stream;
char* dot_array;
char* dot_stream;
char* dot_array;
unsigned char* codeword_array = (unsigned char *) _alloca(length * 3 * sizeof (unsigned char));
unsigned char* masked_codeword_array = (unsigned char *) _alloca(length * 3 * sizeof (unsigned char));
#endif /* _MSC_VER */
@ -1249,7 +1249,9 @@ int dotcode(struct zint_symbol *symbol, unsigned char source[], int length) {
symbol->row_height[k] = 1;
}
symbol->output_options += BARCODE_DOTTY_MODE;
if (!(symbol->output_options & BARCODE_DOTTY_MODE)) {
symbol->output_options += BARCODE_DOTTY_MODE;
}
return 0;
}