Fix compile error in regex overload of read_until.
This commit is contained in:
parent
ff28c6f777
commit
e0daf291bc
@ -269,7 +269,9 @@ std::size_t read_until(SyncReadStream& s,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Need more data.
|
// Need more data.
|
||||||
std::size_t bytes_to_read = read_size_helper(b, 65536);
|
std::size_t bytes_to_read = std::min<std::size_t>(
|
||||||
|
std::max<std::size_t>(512, b.capacity() - b.size()),
|
||||||
|
std::min<std::size_t>(65536, b.max_size() - b.size()));
|
||||||
b.commit(s.read_some(b.prepare(bytes_to_read), ec));
|
b.commit(s.read_some(b.prepare(bytes_to_read), ec));
|
||||||
if (ec)
|
if (ec)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user