mirror of
https://github.com/zxing/zxing.git
synced 2025-01-26 18:44:42 -08:00
Fix issue 189. Need to guard against 'false positive' success in reading version info.
git-svn-id: https://zxing.googlecode.com/svn/trunk@934 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
b2bd63a228
commit
0c07f139b5
|
@ -120,7 +120,7 @@ final class BitMatrixParser {
|
|||
}
|
||||
|
||||
parsedVersion = Version.decodeVersionInformation(versionBits);
|
||||
if (parsedVersion != null) {
|
||||
if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) {
|
||||
return parsedVersion;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ final class BitMatrixParser {
|
|||
}
|
||||
|
||||
parsedVersion = Version.decodeVersionInformation(versionBits);
|
||||
if (parsedVersion != null) {
|
||||
if (parsedVersion != null && parsedVersion.getDimensionForVersion() == dimension) {
|
||||
return parsedVersion;
|
||||
}
|
||||
throw ReaderException.getInstance();
|
||||
|
|
Loading…
Reference in a new issue