]> git.saurik.com Git - wxWidgets.git/commitdiff
Final fix for Bug #1472688 'wxString::Trim() is broken'
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jun 2006 23:21:28 +0000 (23:21 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jun 2006 23:21:28 +0000 (23:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/string.cpp

index 0a70d793a89f21d1b72ddfb95e5ec7b686dd2ce7..99bb5a55a3514be94355fb29391f001ebd5c13db 100644 (file)
@@ -1618,7 +1618,7 @@ wxString& wxString::Trim(bool bFromRight)
         {
             // find last non-space character
             reverse_iterator psz = rbegin();
-            while ( wxSafeIsspace(*psz) && (psz != rend()) )
+            while ( (psz != rend()) && wxSafeIsspace(*psz) )
                 psz++;
             
             // truncate at trailing space start
@@ -1628,7 +1628,7 @@ wxString& wxString::Trim(bool bFromRight)
         {
             // find first non-space character
             iterator psz = begin();
-            while ( wxSafeIsspace(*psz) && (psz != end()) )
+            while ( (psz != end()) && wxSafeIsspace(*psz) )
                 psz++;
 
             // fix up data and length