X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eecb33b0189a3804dead82317a575e0f1d52cd9f..c7ff293b4280dfad1e4133b51d9e93d67c722752:/src/common/string.cpp diff --git a/src/common/string.cpp b/src/common/string.cpp index 4d16458ff8..b9e30160aa 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -481,8 +481,14 @@ size_t wxStringBase::find(const wxStringBase& str, size_t nStart) const while(p - c_str() + str.length() <= length() && wxTmemcmp(p, str.c_str(), str.length()) ) { + //Previosly passed as the first argument to wxTmemchr, + //but C/C++ standard does not specify evaluation order + //of arguments to functions - + //http://embedded.com/showArticle.jhtml?articleID=9900607 + ++p; + //anchor again - p = (const wxChar*)wxTmemchr(++p, + p = (const wxChar*)wxTmemchr(p, str.c_str()[0], length() - (p - c_str()));