Skip to content

Commit 038ff52

Browse files
committed
fixed scanning for ean8 with leading zeros
1 parent 79970ca commit 038ff52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/io/snabble/sdk/ProductDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ private Product findByCodeInternal(String code, boolean recursive) {
10731073
} else if (recursive) {
10741074
if (code.startsWith("0")) {
10751075
return findByCodeInternal(code.substring(1, code.length()), true);
1076-
} else if (code.length() >= 8 && code.length() < 13) {
1076+
} else if (code.length() < 13) {
10771077
String newCode = StringUtils.repeat('0', 13 - code.length()) + code;
10781078
return findByCodeInternal(newCode, false);
10791079
}

0 commit comments

Comments
 (0)