Skip to content

Commit

Permalink
Reset internal variable in JS link parser upon failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed May 31, 2024
1 parent aeead11 commit 9d77578
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/import/html_extract_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,8 @@ namespace html_utilities
(get_current_hyperlink_length() > 0) ? get_current_hyperlink_length() + 1 : 0);
if (m_js_text_start >= m_js_text_end)
{
m_current_hyperlink_length = 0;
m_js_text_start = nullptr;
return nullptr;
}

Expand All @@ -2426,11 +2428,15 @@ namespace html_utilities
}
else
{
m_current_hyperlink_length = 0;
m_js_text_start = nullptr;
return nullptr;
}
}
else
{
m_current_hyperlink_length = 0;
m_js_text_start = nullptr;
return nullptr;
}
}
Expand Down

0 comments on commit 9d77578

Please sign in to comment.