fixed dereferencing of invalid pointers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2302,7 +2302,7 @@ void wxDCBase::DrawLabel(const wxString& text,
|
|||||||
wxString curLine;
|
wxString curLine;
|
||||||
for ( wxString::const_iterator pc = text.begin(); ; ++pc )
|
for ( wxString::const_iterator pc = text.begin(); ; ++pc )
|
||||||
{
|
{
|
||||||
if ( *pc == _T('\n') || pc == text.end() )
|
if ( pc == text.end() || *pc == _T('\n') )
|
||||||
{
|
{
|
||||||
int xRealStart = x; // init it here to avoid compielr warnings
|
int xRealStart = x; // init it here to avoid compielr warnings
|
||||||
|
|
||||||
|
@@ -379,7 +379,7 @@ void wxHtmlWinParser::AddText(const wxString& txt)
|
|||||||
++i, ++x;
|
++i, ++x;
|
||||||
while ( (i < end) &&
|
while ( (i < end) &&
|
||||||
(*i == wxT('\n') || *i == wxT('\r') ||
|
(*i == wxT('\n') || *i == wxT('\r') ||
|
||||||
*i == wxT(' ')) || *i == wxT('\t') )
|
*i == wxT(' ') || *i == wxT('\t')) )
|
||||||
{
|
{
|
||||||
++i;
|
++i;
|
||||||
++x;
|
++x;
|
||||||
|
Reference in New Issue
Block a user