Fix a crash with string trimming.
This commit is contained in:
@ -4150,7 +4150,7 @@ static const char *Html_get_attr2(DilloHtml *html,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tag_parsing_flags & HTML_LeftTrim)
|
if (tag_parsing_flags & HTML_LeftTrim)
|
||||||
while (isspace(Buf.front()))
|
while (not Buf.empty() and isspace(Buf.front()))
|
||||||
Buf.erase( 0, 1 );
|
Buf.erase( 0, 1 );
|
||||||
if (tag_parsing_flags & HTML_RightTrim)
|
if (tag_parsing_flags & HTML_RightTrim)
|
||||||
while (Buf.size() && isspace( Buf.back() ))
|
while (Buf.size() && isspace( Buf.back() ))
|
||||||
|
Reference in New Issue
Block a user