Made sure the BitmapSource subclasses do not reuse a BitArray which is too small.
[zxing.git] / javame / src / com / google / zxing / client / j2me / LCDUIImageMonochromeBitmapSource.java
index cadb815..266cebf 100644 (file)
@@ -57,7 +57,7 @@ public final class LCDUIImageMonochromeBitmapSource implements MonochromeBitmapS
   }
 
   public BitArray getBlackRow(int y, BitArray row, int startX, int getWidth) {
-    if (row == null) {
+    if (row == null || row.getSize() < getWidth) {
       row = new BitArray(getWidth);
     } else {
       row.clear();