Issue 165
authorsrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 6 Apr 2009 21:56:06 +0000 (21:56 +0000)
committersrowen <srowen@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 6 Apr 2009 21:56:06 +0000 (21:56 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@900 59b500cc-1b3d-0410-9834-0bbf25fbcc57

core/src/com/google/zxing/qrcode/decoder/Version.java

index 18057a7..6628e86 100755 (executable)
@@ -121,6 +121,7 @@ public final class Version {
       int bitsDifference = FormatInformation.numBitsDiffering(versionBits, targetVersion);\r
       if (bitsDifference < bestDifference) {\r
         bestVersion = i + 7;\r
+        bestDifference = bitsDifference;\r
       }\r
     }\r
     // We can tolerate up to 3 bits of error since no two version info codewords will\r