From 9f09b8eed11017ac4aba23694de5e94c78bcc381 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 11 Aug 2019 11:38:16 -0700 Subject: [PATCH] Fix a warning --- test/scan.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/scan.h b/test/scan.h index da40240a..ace84f77 100644 --- a/test/scan.h +++ b/test/scan.h @@ -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); }