Prevent latch to incorrect mode when GTIN starts with 9

Fixes #97 reported by Karl Karlsson
This commit is contained in:
Robin Stuart 2018-04-18 20:24:21 +01:00
parent e749872e7d
commit 909e307636

View File

@ -1197,7 +1197,7 @@ int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_str
} else {
/* any AIs */
encoding_method = 2;
if (debug) printf("Choosing Mehod 2\n");
if (debug) printf("Choosing Method 2\n");
}
if (((strlen(source) >= 20) && (encoding_method == 1)) && ((source[2] == '9') && (source[16] == '3'))) {
@ -1218,9 +1218,6 @@ int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_str
if (weight_str[0] == '0') { /* Maximum weight = 99999 */
encoding_method = 7;
if ((source[19] == '3') && (strlen(source) == 26)) {
/* (01) and (3103) */
float weight; /* In kilos */
@ -1271,8 +1268,6 @@ int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_str
if (weight_str[0] == '0') { /* Maximum weight = 99999 */
encoding_method = 8;
if (((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) {
/* (01) and (3202)/(3203) */
float weight; /* In pounds */