diff options
author | Mike Buland <eichlan@xagasoft.com> | 2020-05-12 12:10:24 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2020-05-12 12:10:24 -0700 |
commit | a6e4d31306fe08d97c3687858f6b4c107bc1ebbf (patch) | |
tree | c319e440478e71881c4a708580c3f4f94f520a1b /src | |
parent | 4219be08c02b3f0a5ec214447dfa0918fa390176 (diff) | |
download | libbu++-a6e4d31306fe08d97c3687858f6b4c107bc1ebbf.tar.gz libbu++-a6e4d31306fe08d97c3687858f6b4c107bc1ebbf.tar.bz2 libbu++-a6e4d31306fe08d97c3687858f6b4c107bc1ebbf.tar.xz libbu++-a6e4d31306fe08d97c3687858f6b4c107bc1ebbf.zip |
Fixed static char* comparison bug in Bu::UtfString.
Diffstat (limited to 'src')
-rw-r--r-- | src/unstable/utfstring.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/unstable/utfstring.cpp b/src/unstable/utfstring.cpp index ea91523..21b3f82 100644 --- a/src/unstable/utfstring.cpp +++ b/src/unstable/utfstring.cpp | |||
@@ -644,11 +644,14 @@ bool Bu::UtfString::operator==( const Bu::String &rhs ) const | |||
644 | bool Bu::UtfString::operator==( const char *rhs ) const | 644 | bool Bu::UtfString::operator==( const char *rhs ) const |
645 | { | 645 | { |
646 | // Nieve comparison | 646 | // Nieve comparison |
647 | for( int j = 0; j < aData.getSize(); j++ ) | 647 | int j; |
648 | for( j = 0; j < aData.getSize(); j++ ) | ||
648 | { | 649 | { |
649 | if( rhs[j] == '\0' || aData[j] != rhs[j] ) | 650 | if( rhs[j] == '\0' || aData[j] != rhs[j] ) |
650 | return false; | 651 | return false; |
651 | } | 652 | } |
653 | if( rhs[j] != '\0' ) | ||
654 | return false; | ||
652 | 655 | ||
653 | return true; | 656 | return true; |
654 | } | 657 | } |