From 1ea5bd399b081b598435e52854107bc506640a28 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 18 Dec 2007 18:10:28 +0000 Subject: Corrected empty string comparrisons in Bu::ParamProc, it was checking for null strings, which are no longer handed out in the Bu::FString, I think it's better this way, but the Bu::ParamProc may need a little re-working to make it just right (right now the default value of a string cannot be empty, doesn't sound too bad...) --- src/paramproc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/paramproc.cpp b/src/paramproc.cpp index f016b78..d97821a 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp @@ -240,7 +240,7 @@ void Bu::ParamProc::process( int argc, char *argv[] ) { if( s->val.isSet() ) { - if( s->sValue.getStr() == NULL ) + if( s->sValue == "" ) { s->val = argv[arg]+s->sWord.getSize()+3; } @@ -268,7 +268,7 @@ void Bu::ParamProc::process( int argc, char *argv[] ) int add = 0; if( s->val.isSet() ) { - if( s->sValue.getStr() == NULL ) + if( s->sValue == "" ) { if( arg+1 >= argc ) { @@ -314,7 +314,7 @@ void Bu::ParamProc::process( int argc, char *argv[] ) bool bUsed = false; if( s->val.isSet() ) { - if( s->sValue.getStr() == NULL ) + if( s->sValue == "" ) { s->val = argv[arg]+chr+1; bUsed = true; @@ -349,7 +349,7 @@ void Bu::ParamProc::process( int argc, char *argv[] ) bool bUsed = false; if( s->val.isSet() ) { - if( s->sValue.getStr() == NULL ) + if( s->sValue == "" ) { s->val = argv[arg+1]; bUsed = true; @@ -397,7 +397,7 @@ Bu::ParamProc::ArgSpec *Bu::ParamProc::checkWord( const char *arg ) std::list::const_iterator i; for( i = lArg.begin(); i != lArg.end(); i++ ) { - if( (*i)->sWord.getStr() == NULL ) + if( (*i)->sWord == "" ) continue; if( !strcmp( (*i)->sWord.getStr(), arg ) ) -- cgit v1.2.3