Skip to content

Commit

Permalink
Fix misdetection of Tamron SP AF 300mm as Canon EF 75-300mm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
webmeister committed Dec 9, 2020
1 parent 45e0995 commit ea4fa6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/canonmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,9 @@ namespace Exiv2 {
std::ostringstream oss;
oss << std::fixed << std::setprecision(0);
if (ltfl.focalLengthMin_ == ltfl.focalLengthMax_) {
oss << (ltfl.focalLengthMin_ / divisor) << "mm";
oss << " " << (ltfl.focalLengthMin_ / divisor) << "mm";
} else {
oss << (ltfl.focalLengthMin_ / divisor) << "-" << (ltfl.focalLengthMax_ / divisor) << "mm";
oss << " " << (ltfl.focalLengthMin_ / divisor) << "-" << (ltfl.focalLengthMax_ / divisor) << "mm";
}
ltfl.focalLength_ = oss.str();
}
Expand Down

0 comments on commit ea4fa6c

Please sign in to comment.