mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Comply with Rule 2
This commit is contained in:
parent
063ac4ce4f
commit
2c5e7332e9
@ -675,17 +675,35 @@ int ean_128(struct zint_symbol *symbol, unsigned char source[])
|
||||
for(i = 0; i < read; i++) {
|
||||
if(set[i] == 'C') {
|
||||
if(reduced[i] == '[') {
|
||||
if(c_count % 2) { set[i - c_count] = 'B'; }
|
||||
if(c_count % 2) {
|
||||
if((i - c_count) != 0) {
|
||||
set[i - c_count] = 'B';
|
||||
} else {
|
||||
set[i - 1] = 'B';
|
||||
}
|
||||
}
|
||||
c_count = 0;
|
||||
} else {
|
||||
c_count++;
|
||||
}
|
||||
} else {
|
||||
if(c_count % 2) { set[i - c_count] = 'B'; }
|
||||
if(c_count % 2) {
|
||||
if((i - c_count) != 0) {
|
||||
set[i - c_count] = 'B';
|
||||
} else {
|
||||
set[i - 1] = 'B';
|
||||
}
|
||||
}
|
||||
c_count = 0;
|
||||
}
|
||||
}
|
||||
if(c_count % 2) { set[i - c_count] = 'B'; }
|
||||
if(c_count % 2) {
|
||||
if((i - c_count) != 0) {
|
||||
set[i - c_count] = 'B';
|
||||
} else {
|
||||
set[i - 1] = 'B';
|
||||
}
|
||||
}
|
||||
|
||||
/* for(i = 0; i < read; i++) {
|
||||
printf("char %c mode %c\n", reduced[i], set[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user