Commit 9f09b8ee authored by Victor Zverovich's avatar Victor Zverovich

Fix a warning

parent 2bb8120d
......@@ -161,8 +161,10 @@ struct scan_handler : error_handler {
void on_text(const char* begin, const char* end) {
auto size = end - begin;
auto it = scan_ctx_.begin();
if (it + size > scan_ctx_.end() || !std::equal(begin, end, it))
if (it + size > scan_ctx_.end() ||
!std::equal(begin, end, make_checked(it, size))) {
on_error("invalid input");
}
scan_ctx_.advance_to(it + size);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment