mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-24 12:14:26 +00:00
Fix a warning
This commit is contained in:
parent
2bb8120d98
commit
9f09b8eed1
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user