diff options
Diffstat (limited to 'ACE/ace/String_Base.cpp')
-rw-r--r-- | ACE/ace/String_Base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ACE/ace/String_Base.cpp b/ACE/ace/String_Base.cpp index fef051a19ed..7000454972f 100644 --- a/ACE/ace/String_Base.cpp +++ b/ACE/ace/String_Base.cpp @@ -394,8 +394,8 @@ ACE_String_Base<CHAR>::compare (const ACE_String_Base<CHAR> &s) const s.rep_, smaller_length * sizeof (CHAR)); - if (!result) - result = static_cast<int> (this->len_ - s.len_); + if (result == 0 && this->len_ != s.len_) + result = this->len_ > s.len_ ? 1 : -1; return result; } |