From: Vadim Zeitlin Date: Sat, 12 Apr 2008 17:05:01 +0000 (+0000) Subject: test that iterator is valid before comparing with it (another bug introduced when... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e447be55142c003de608f5feb0867577b21ed929?ds=sidebyside test that iterator is valid before comparing with it (another bug introduced when replacing indices with iterators) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 3c466c6b20..d20b50f152 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -1204,7 +1204,7 @@ void wxDC::DrawLabel(const wxString& text, 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