From 785b3f955f909865445f6b92f7daac1a14d2595c Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 30 Jun 2003 20:59:28 +0000 Subject: some extra checking --- src/Keys.cc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/Keys.cc b/src/Keys.cc index e6105aa..f25eb4a 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: Keys.cc,v 1.33 2003/06/30 19:42:20 fluxgen Exp $ +//$Id: Keys.cc,v 1.34 2003/06/30 20:59:28 fluxgen Exp $ #include "Keys.hh" @@ -194,19 +194,22 @@ bool Keys::load(const char *filename) { const char *str = FbTk::StringUtil::strcasestr(linebuffer.c_str(), val[argc].c_str() + 1); // +1 to skip ':' - - // +1 to remove the first ':' - last_key->m_command = CommandParser::instance().parseLine(str); - - if (*last_key->m_command == 0) { + if (str == 0) { cerr<<"File: "< "<m_command = CommandParser::instance().parseLine(str); + + if (*last_key->m_command == 0) { + cerr<<"File: "< "<