From de510d445b328f5315a3aff4ac00d610bb23fa8e Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 4 Apr 2012 15:23:14 +0200 Subject: [PATCH] throw an error if the --fallback syntax is wrong --- apps/openmw/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index b541ea0d3..cdc4af4b0 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -71,8 +71,8 @@ void validate(boost::any &v, std::vector const &tokens, FallbackMap for(std::vector::const_iterator it=tokens.begin(); it != tokens.end(); it++) { int sep = it->find(","); - if(sep < 1) - continue; + if(sep < 1 || sep = it->length()-1) + throw boost::program_options::validation_error(boost::program_options::validation_error::invalid_option_value); std::string key(it->substr(0,sep)); std::string value(it->substr(sep+1));