Fix crash on unexpected closing tag after error
This commit is contained in:
parent
9cccc08b84
commit
43f84098b8
|
@ -144,7 +144,7 @@ struct Scanner {
|
||||||
|
|
||||||
if (is_closing_tag) {
|
if (is_closing_tag) {
|
||||||
// The tag correctly closes the topmost element on the stack
|
// The tag correctly closes the topmost element on the stack
|
||||||
if (next_tag == tags.back()) return false;
|
if (!tags.empty() && tags.back() == next_tag) return false;
|
||||||
|
|
||||||
// Otherwise, dig deeper and queue implicit end tags (to be nice in
|
// Otherwise, dig deeper and queue implicit end tags (to be nice in
|
||||||
// the case of malformed HTML)
|
// the case of malformed HTML)
|
||||||
|
|
Loading…
Reference in New Issue