]> git.saurik.com Git - wxWidgets.git/commitdiff
test that iterator is valid before comparing with it (another bug introduced when...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 12 Apr 2008 17:05:01 +0000 (17:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 12 Apr 2008 17:05:01 +0000 (17:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcbase.cpp

index 3c466c6b205cc87b60d55b14eb3ced334387529b..d20b50f152cecc0c0d36ba2afbac321101252688 100644 (file)
@@ -1204,7 +1204,7 @@ void wxDC::DrawLabel(const wxString& text,
     wxString curLine;
     for ( wxString::const_iterator pc = text.begin(); ; ++pc )
     {
     wxString curLine;
     for ( wxString::const_iterator pc = text.begin(); ; ++pc )
     {
-        if ( *pc == _T('\n') || pc == text.end() )
+        if ( pc == text.end() || *pc == '\n' )
         {
             int xRealStart = x; // init it here to avoid compielr warnings
 
         {
             int xRealStart = x; // init it here to avoid compielr warnings