Skip to content

Commit b6d0001

Browse files
committed
Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm
When searching for the Tamron lens, only the string "300mm" is searched in the lens description, which also happens to be present for the Canon lens. Since the Canon lens comes first in the list, it wins. Fix this issue by prefixing the search string with a single space so it always has to match the full focal length specification.
1 parent e0b2022 commit b6d0001

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/canonmn_int.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,9 +1873,9 @@ namespace Exiv2 {
18731873
std::ostringstream oss;
18741874
oss << std::fixed << std::setprecision(0);
18751875
if (ltfl.focalLengthMin_ == ltfl.focalLengthMax_) {
1876-
oss << (ltfl.focalLengthMin_ / divisor) << "mm";
1876+
oss << " " << (ltfl.focalLengthMin_ / divisor) << "mm";
18771877
} else {
1878-
oss << (ltfl.focalLengthMin_ / divisor) << "-" << (ltfl.focalLengthMax_ / divisor) << "mm";
1878+
oss << " " << (ltfl.focalLengthMin_ / divisor) << "-" << (ltfl.focalLengthMax_ / divisor) << "mm";
18791879
}
18801880
ltfl.focalLength_ = oss.str();
18811881
}

0 commit comments

Comments
 (0)