diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-05 05:13:27 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-08-05 05:13:27 +0000 |
commit | 11ebcc9a29f7b3311f536bae693ceaf944733fa8 (patch) | |
tree | c17925b8c7577a9b34f2e91e480370dafc5a1adf /ace | |
parent | 6b372d06c4bdce80d3ef22784d4e2b00d6de224e (diff) | |
download | ATCD-11ebcc9a29f7b3311f536bae693ceaf944733fa8.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace')
-rw-r--r-- | ace/OS.i | 4 | ||||
-rw-r--r-- | ace/SString.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
@@ -1263,7 +1263,7 @@ ACE_INLINE const char * ACE_OS::strnstr (const char *s, const char *t, size_t len) { size_t t_len = ::strlen (t); - for (size_t i = 0; i < len - t_len; i++) + for (size_t i = 0; i <= len - t_len; i++) if (::memcmp (s + i, t, t_len) == 0) return s + i; @@ -9115,7 +9115,7 @@ ACE_INLINE const wchar_t * ACE_OS::strnstr (const wchar_t *s, const wchar_t *t, size_t len) { size_t t_len = ACE_OS::strlen (t); - for (size_t i = 0; i < len - t_len; i++) + for (size_t i = 0; i <= len - t_len; i++) if (::memcmp (s + i, t, t_len * sizeof (wchar_t)) == 0) return s + i; diff --git a/ace/SString.cpp b/ace/SString.cpp index 71b24adc6fa..b630b082d1a 100644 --- a/ace/SString.cpp +++ b/ace/SString.cpp @@ -876,7 +876,7 @@ ACE_WString::strstr (const ACE_USHORT16 *s1, const ACE_USHORT16 *s2) size_t len = len1 - len2; - for (size_t i = 0; i < len; i++) + for (size_t i = 0; i <= len; i++) { size_t j; |