From b29c8f439b3e5f02e062489bb9cd5d9ea3b1e6f0 Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Mon, 24 Nov 2014 12:12:22 +0100 Subject: [PATCH] pvatools: enum index out of range fix --- pvtoolsSrc/pvutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);