diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-08-14 14:37:22 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-08-14 14:37:22 +0000 |
commit | f1d6b50ac5a014a5cd87a605bd4f4e1e6342ef7d (patch) | |
tree | ba8615da5a64ea173001156a74fb1903ed6da9c6 /src/paramproc.cpp | |
parent | cd0fef04fab0229ac9bb332806342fd8ee3c8673 (diff) | |
download | libbu++-f1d6b50ac5a014a5cd87a605bd4f4e1e6342ef7d.tar.gz libbu++-f1d6b50ac5a014a5cd87a605bd4f4e1e6342ef7d.tar.bz2 libbu++-f1d6b50ac5a014a5cd87a605bd4f4e1e6342ef7d.tar.xz libbu++-f1d6b50ac5a014a5cd87a605bd4f4e1e6342ef7d.zip |
Fixed a crash in the FString::prepend function on a null string corner case.
Also added more tests to the FString unit tests and switched the ParamProc to
using FString instead of std::string, this will break a few programs in very
minor ways, a few seconds each to fix, I'd say.
Diffstat (limited to 'src/paramproc.cpp')
-rw-r--r-- | src/paramproc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 34e973e..67ef44b 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp | |||
@@ -11,7 +11,7 @@ Bu::ParamProc::ParamPtr::ParamPtr() | |||
11 | type = vtunset; | 11 | type = vtunset; |
12 | } | 12 | } |
13 | 13 | ||
14 | ptrtype( std::string, str ); | 14 | ptrtype( Bu::FString, str ); |
15 | ptrtype( uint64_t, uint64 ); | 15 | ptrtype( uint64_t, uint64 ); |
16 | ptrtype( uint32_t, uint32 ); | 16 | ptrtype( uint32_t, uint32 ); |
17 | ptrtype( uint16_t, uint16 ); | 17 | ptrtype( uint16_t, uint16 ); |
@@ -481,7 +481,7 @@ int Bu::ParamProc::help( int argc, char *argv[] ) | |||
481 | if( (*i)->sWord.getStr() ) | 481 | if( (*i)->sWord.getStr() ) |
482 | { | 482 | { |
483 | printf("--"); | 483 | printf("--"); |
484 | std::string sTmp = (*i)->sWord.getStr(); | 484 | Bu::FString sTmp = (*i)->sWord.getStr(); |
485 | if( (*i)->sExtra.getStr() ) | 485 | if( (*i)->sExtra.getStr() ) |
486 | sTmp += (*i)->sExtra.getStr(); | 486 | sTmp += (*i)->sExtra.getStr(); |
487 | printf( fmt, sTmp.c_str() ); | 487 | printf( fmt, sTmp.c_str() ); |