fixed daclist setter

This commit is contained in:
Erik Frojdh
2022-03-24 17:46:20 +01:00
parent 589124845a
commit b112cf81c4
2 changed files with 5 additions and 1 deletions

View File

@ -2104,7 +2104,7 @@ defs::dacIndex Detector::decodeNamedDac(const std::string &name) {
std::string Detector::decodeNamedDac(defs::dacIndex i) {
auto names = getDacNames();
auto index = static_cast<size_t>(i);
if (index > names.size())
if (index >= names.size())
throw RuntimeError("Dac index out of range");
return names[index];
}