mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Prevent latch to incorrect mode when GTIN starts with 9
Fixes #97 reported by Karl Karlsson
This commit is contained in:
parent
e749872e7d
commit
909e307636
@ -1197,7 +1197,7 @@ int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_str
|
|||||||
} else {
|
} else {
|
||||||
/* any AIs */
|
/* any AIs */
|
||||||
encoding_method = 2;
|
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'))) {
|
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 */
|
if (weight_str[0] == '0') { /* Maximum weight = 99999 */
|
||||||
|
|
||||||
|
|
||||||
encoding_method = 7;
|
|
||||||
|
|
||||||
if ((source[19] == '3') && (strlen(source) == 26)) {
|
if ((source[19] == '3') && (strlen(source) == 26)) {
|
||||||
/* (01) and (3103) */
|
/* (01) and (3103) */
|
||||||
float weight; /* In kilos */
|
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 */
|
if (weight_str[0] == '0') { /* Maximum weight = 99999 */
|
||||||
|
|
||||||
encoding_method = 8;
|
|
||||||
|
|
||||||
if (((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) {
|
if (((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) {
|
||||||
/* (01) and (3202)/(3203) */
|
/* (01) and (3202)/(3203) */
|
||||||
float weight; /* In pounds */
|
float weight; /* In pounds */
|
||||||
|
Loading…
Reference in New Issue
Block a user