Made sure the BitmapSource subclasses do not reuse a BitArray which is too small.
[zxing.git] / android-m3 / src / com / google / zxing / client / android / RGBMonochromeBitmapSource.java
index 5e6faa0..2fe42c5 100755 (executable)
@@ -52,7 +52,7 @@ final class RGBMonochromeBitmapSource implements MonochromeBitmapSource {
   }
 
   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();