From 55b4d46781ffb8d485bc26d21190446e221507d9 Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Fri, 2 Apr 2010 05:23:25 -0400 Subject: [PATCH] lib: fixed bug in GlobalConfigFile that incorrectly read blank values --- src/configfile.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/configfile.cc b/src/configfile.cc index a44ea70b..0e8ee2fe 100644 --- a/src/configfile.cc +++ b/src/configfile.cc @@ -387,10 +387,11 @@ void GlobalConfigFile::Load() if( keyword == "last_device" ) { iss >> std::ws; + m_lastDevice.clear(); iss >> m_lastDevice; } else if( keyword == "verbose_logging" ) { - int flag; + int flag = 0; iss >> flag; m_verboseLogging = flag; } @@ -398,6 +399,7 @@ void GlobalConfigFile::Load() // store any other keys as app keys if( keyword.substr(0, 2) == "X-" ) { iss >> std::ws; + line.clear(); std::getline(iss, line); m_keymap[keyword] = line; } -- 2.11.4.GIT