diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index ea9a9d903e..4dbe41890d 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -257,13 +257,10 @@ bool String::operator==(const StrRange &p_range) const { return true; const CharType *c_str=p_range.c_str; - - int l=length(); - - const CharType *dst = p_range.c_str; + const CharType *dst = &operator[](0); /* Compare char by char */ - for (int i=0;i<l;i++) { + for (int i=0;i<len;i++) { if (c_str[i]!=dst[i]) return false; |