aboutsummaryrefslogtreecommitdiff
path: root/src/unstable
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2020-05-12 12:10:24 -0700
committerMike Buland <eichlan@xagasoft.com>2020-05-12 12:10:24 -0700
commita6e4d31306fe08d97c3687858f6b4c107bc1ebbf (patch)
treec319e440478e71881c4a708580c3f4f94f520a1b /src/unstable
parent4219be08c02b3f0a5ec214447dfa0918fa390176 (diff)
downloadlibbu++-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/unstable')
-rw-r--r--src/unstable/utfstring.cpp5
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
644bool Bu::UtfString::operator==( const char *rhs ) const 644bool 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}