mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Bugfix: Ouput binding in raster images
Also: tidy up use of output_options
This commit is contained in:
@ -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;
|
||||
}
|
Reference in New Issue
Block a user