From a6e4d31306fe08d97c3687858f6b4c107bc1ebbf Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 12 May 2020 12:10:24 -0700 Subject: Fixed static char* comparison bug in Bu::UtfString. --- src/unstable/utfstring.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 bool Bu::UtfString::operator==( const char *rhs ) const { // Nieve comparison - for( int j = 0; j < aData.getSize(); j++ ) + int j; + for( j = 0; j < aData.getSize(); j++ ) { if( rhs[j] == '\0' || aData[j] != rhs[j] ) return false; } + if( rhs[j] != '\0' ) + return false; return true; } -- cgit v1.2.3