Commit af82c415 by Tuukka Kivilahti

buggagesearch korjattu

1 parent 2d17df61
...@@ -181,6 +181,11 @@ public class BarcodeBean implements BarcodeBeanLocal { ...@@ -181,6 +181,11 @@ public class BarcodeBean implements BarcodeBeanLocal {
// remove some random -stuff to start of string // remove some random -stuff to start of string
for (int i = lenght - barcodeLenght; i > 0; --i) { for (int i = lenght - barcodeLenght; i > 0; --i) {
// barcode was shorter than random stuff, I think that it does not match
if(barcode.length() <= 0)
return null;
barcode = barcode.substring(1); barcode = barcode.substring(1);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!