aboutsummaryrefslogtreecommitdiffstats
path: root/nexus/pdc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nexus/pdc.cc')
-rw-r--r--nexus/pdc.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/nexus/pdc.cc b/nexus/pdc.cc
index 60cc511c..98a44276 100644
--- a/nexus/pdc.cc
+++ b/nexus/pdc.cc
@@ -304,8 +304,12 @@ struct PDCParser
if (!val.is_string)
log_error("expecting string argument to -iobuf (line %d)\n", lineno);
std::stringstream ss(val.str);
- std::string k, v;
- while (ss >> k >> v) {
+ std::string kv;
+ while (ss >> kv) {
+ auto eqp = kv.find('=');
+ if (eqp == std::string::npos)
+ log_error("expected key-value pair separated by '=' (line %d)", lineno);
+ std::string k = kv.substr(0, eqp), v = kv.substr(eqp + 1);
args[ctx->id(k)] = v;
}
} else {