From 4685aea2a1a2ad06b55f62b76ac1372262fac71a Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Sat, 3 Aug 2013 00:04:19 +0200 Subject: [PATCH] mwiniimport: ignore empty values --- apps/mwiniimporter/importer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/mwiniimporter/importer.cpp b/apps/mwiniimporter/importer.cpp index d5d6a3c84..8732b3eab 100644 --- a/apps/mwiniimporter/importer.cpp +++ b/apps/mwiniimporter/importer.cpp @@ -690,6 +690,10 @@ MwIniImporter::multistrmap MwIniImporter::loadIniFile(const std::string& filenam std::string key(section + ":" + line.substr(0,pos)); std::string value(line.substr(pos+1)); + if(value.empty()) { + std::cout << "Warning: ignored empty value for key '" << key << "'." << std::endl; + continue; + } multistrmap::iterator it; if((it = map.find(key)) == map.end()) {