summaryrefslogtreecommitdiffabout
path: root/lib/params.cc
Unidiff
Diffstat (limited to 'lib/params.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/params.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/params.cc b/lib/params.cc
index 03867d5..b181811 100644
--- a/lib/params.cc
+++ b/lib/params.cc
@@ -33,7 +33,8 @@ namespace opkele {
33 string::size_type nl = kv.find('\n',co+1); 33 string::size_type nl = kv.find('\n',co+1);
34 if(nl==string::npos) 34 if(nl==string::npos)
35 throw bad_input(OPKELE_CP_ "malformed input"); 35 throw bad_input(OPKELE_CP_ "malformed input");
36 insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1))); 36 if(nl>co)
37 insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1)));
37 p = nl+1; 38 p = nl+1;
38 } 39 }
39 } 40 }