diff --git a/pvtoolsSrc/pvutils.cpp b/pvtoolsSrc/pvutils.cpp index f56b53f..976b265 100644 --- a/pvtoolsSrc/pvutils.cpp +++ b/pvtoolsSrc/pvutils.cpp @@ -130,7 +130,7 @@ std::ostream& printEnumT(std::ostream& o, epics::pvData::PVStructure const & pvE if (enumMode == AutoEnum || enumMode == StringEnum) { int32 ix = pvIndex->get(); - if (ix < 0 || ix > static_cast(pvChoices->getLength())) + if (ix < 0 || ix >= static_cast(pvChoices->getLength())) o << ix; else pvChoices->dumpValue(o, ix);