srctree

Robin Linden parent df6a5c49 7450d756
html2: Fix tokenizer logging reading out of bounds

This issue was introduced in 6355517ada193ebb067dc214a07ac692fb9b32ad.

inlinesplit
html2/tokenizer.cpp added: 7, removed: 2, total 5
@@ -73,7 +73,12 @@ std::string to_string(Token const &token) {
 
void Tokenizer::run() {
while (true) {
spdlog::trace("Running state {} w/ next char {}", state_, input_[pos_]);
if (input_.size() > pos_) {
spdlog::trace("Running state {} w/ next char {}", state_, input_[pos_]);
} else {
spdlog::trace("Running state {} after input end", state_);
}
 
switch (state_) {
case State::Data: {
auto c = consume_next_input_character();