Incorporate FreeBSD fix from @mandree (#5651) plus a little hardening
This commit is contained in:
@@ -502,11 +502,11 @@ FrameData::FrameData(rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory*
|
|||||||
} else if (!make.compare (0, 6, "PENTAX") || (!make.compare (0, 5, "RICOH") && !model.compare (0, 6, "PENTAX"))) {
|
} else if (!make.compare (0, 6, "PENTAX") || (!make.compare (0, 5, "RICOH") && !model.compare (0, 6, "PENTAX"))) {
|
||||||
// ISO at max value supported, check manufacturer specific
|
// ISO at max value supported, check manufacturer specific
|
||||||
if (iso_speed == 65535 || iso_speed == 0) {
|
if (iso_speed == 65535 || iso_speed == 0) {
|
||||||
rtexif::Tag* baseIsoTag = mnote->getTag("ISO");
|
const rtexif::Tag* const baseIsoTag = mnote->getTag("ISO");
|
||||||
if (baseIsoTag) {
|
if (baseIsoTag) {
|
||||||
std::string isoData = baseIsoTag->valueToString();
|
const std::string isoData = baseIsoTag->valueToString();
|
||||||
if (isoData.size() > 1) {
|
if (isoData.size() > 1) {
|
||||||
iso_speed = stoi(isoData);
|
iso_speed = std::stoi(isoData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4606,8 +4606,9 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
|||||||
Glib::ustring temp;
|
Glib::ustring temp;
|
||||||
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, temp, pedited->wavelet.Lmethod);
|
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, temp, pedited->wavelet.Lmethod);
|
||||||
|
|
||||||
if (!temp.empty()) {
|
try {
|
||||||
wavelet.Lmethod = std::stoi(temp);
|
wavelet.Lmethod = std::stoi(temp);
|
||||||
|
} catch (...) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, wavelet.Lmethod, pedited->wavelet.Lmethod);
|
assignFromKeyfile(keyFile, "Wavelet", "LevMethod", pedited, wavelet.Lmethod, pedited->wavelet.Lmethod);
|
||||||
|
Reference in New Issue
Block a user