From e447be55142c003de608f5feb0867577b21ed929 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 12 Apr 2008 17:05:01 +0000 Subject: [PATCH] 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 --- src/common/dcbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.45.2