Skip to content

Commit

Permalink
Fix a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Aug 11, 2019
1 parent 2bb8120 commit 9f09b8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9f09b8e

Please sign in to comment.