[wx-dev] [ wxwindows-Bugs-1956966 ] wx2.9 trunk wxHTML
HtmlizeLinebreaks bug
SourceForge.net
noreply at sourceforge.net
Sun May 4 01:45:58 PDT 2008
Bugs item #1956966, was opened at 2008-05-04 00:55
Message generated for change (Comment added) made by vaclavslavik
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1956966&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: HTML
Group: Trivial
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: HzD_Byte (hzd_byte)
Assigned to: Vaclav Slavik (vaclavslavik)
Summary: wx2.9 trunk wxHTML HtmlizeLinebreaks bug
Initial Comment:
An error in "src/html/m_pre.cpp", HtmlizeLinebreaks:
for ( wxString::const_iterator i = str.begin(); i != str.end(); ++i )
{
switch ( (*i).GetValue() )
{
case '<':
while ( i != str.end() && *i != '>')
{
out << *i++;
}
out << '>';
break;
....
}
If inner "while" ends with "i == str.end()", then "++i" occurs and "i != str.end()" of outer "for" is true. It's incorrect..
Solution:
case '<':
while ( i != str.end() && *i != '>')
{
out << *i++;
}
out << '>';
if (i == str.end()) return out;
break;
----------------------------------------------------------------------
>Comment By: Vaclav Slavik (vaclavslavik)
Date: 2008-05-04 10:45
Message:
Logged In: YES
user_id=80834
Originator: NO
Applied, thanks a lot!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1956966&group_id=9863
More information about the wx-dev
mailing list