Fix eval order of arguments...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton 2005-02-09 17:40:10 +00:00
parent 8410a7104a
commit f68ca36e0d

View File

@ -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()));