From a91ba8ef9e54e7f0e86a7439ec9293a31ed97657 Mon Sep 17 00:00:00 2001 From: mrkraimer Date: Wed, 17 Jul 2019 10:43:13 -0400 Subject: [PATCH] fixed a bug --- src/pv/pvaClient.h | 2 +- src/pvaClientData.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/pv/pvaClient.h b/src/pv/pvaClient.h index b908518..aaa874c 100644 --- a/src/pv/pvaClient.h +++ b/src/pv/pvaClient.h @@ -617,7 +617,7 @@ public: * * Accepts arguments of the form field='value' where value is json syntax. * field is name.name... - * @parm args The arguments + * @param args The arguments * @throw runtime_error if failure. */ void parse(const std::vector &args); diff --git a/src/pvaClientData.cpp b/src/pvaClientData.cpp index 32acd1b..349b33f 100644 --- a/src/pvaClientData.cpp +++ b/src/pvaClientData.cpp @@ -156,19 +156,22 @@ void PvaClientData::parse(const std::vector &args) if(!pvStructure) throw std::runtime_error(messagePrefix + noStructure); if(!bitSet) throw std::runtime_error(messagePrefix + noStructure); size_t num = args.size(); + if(num<1) throw std::runtime_error(messagePrefix + " no arguments"); for(size_t i=0; igetSubField(field)); // look for enumerated structure