Fixed error where empty vector was being popped from

Co-authored-by: Rahul Zhade <zhade3@github.com>
This commit is contained in:
Phil Turnbull 2018-08-07 14:18:18 -04:00
parent fa5426a735
commit 3e586b10fc
No known key found for this signature in database
GPG Key ID: D81B30C00789D262
1 changed files with 4 additions and 2 deletions

View File

@ -202,8 +202,10 @@ struct Scanner {
lexer->advance(lexer, false); lexer->advance(lexer, false);
if (lexer->lookahead == '>') { if (lexer->lookahead == '>') {
lexer->advance(lexer, false); lexer->advance(lexer, false);
tags.pop_back(); if (!tags.empty()) {
lexer->result_symbol = SELF_CLOSING_TAG_DELIMITER; tags.pop_back();
lexer->result_symbol = SELF_CLOSING_TAG_DELIMITER;
}
return true; return true;
} }
return false; return false;