diff options
Diffstat (limited to 'ace/String_Base.i')
-rw-r--r-- | ace/String_Base.i | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ace/String_Base.i b/ace/String_Base.i index 8664859354f..fbc8ba4c934 100644 --- a/ace/String_Base.i +++ b/ace/String_Base.i @@ -391,7 +391,7 @@ ACE_String_Base<CHAR>::strstr (const ACE_String_Base<CHAR> &s) const template <class CHAR> ACE_INLINE ssize_t ACE_String_Base<CHAR>::rfind (CHAR c, ssize_t pos) const { - if (pos > ACE_static_cast (ssize_t, this->len_)) + if (pos == npos || pos > ACE_static_cast (ssize_t, this->len_)) { pos = ACE_static_cast (ssize_t, this->len_); } |