mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 14:24:31 +02:00
Fix array end calculation in utf8 assertion
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Version 176:
|
Version 176:
|
||||||
|
|
||||||
* Tidy up Quick Reference
|
* Tidy up Quick Reference
|
||||||
|
* Fix array end calculation in utf8 assertion
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -194,7 +194,7 @@ write(std::uint8_t const* in, std::size_t size)
|
|||||||
// Add characters to the code point
|
// Add characters to the code point
|
||||||
while(n--)
|
while(n--)
|
||||||
*p_++ = *in++;
|
*p_++ = *in++;
|
||||||
BOOST_ASSERT(p_ <= cp_ + 5);
|
BOOST_ASSERT(p_ <= cp_ + 4);
|
||||||
|
|
||||||
// Still incomplete?
|
// Still incomplete?
|
||||||
if(need_ > 0)
|
if(need_ > 0)
|
||||||
@@ -313,7 +313,7 @@ tail:
|
|||||||
while(n--)
|
while(n--)
|
||||||
*p_++ = *in++;
|
*p_++ = *in++;
|
||||||
BOOST_ASSERT(in == end);
|
BOOST_ASSERT(in == end);
|
||||||
BOOST_ASSERT(p_ <= cp_ + 5);
|
BOOST_ASSERT(p_ <= cp_ + 4);
|
||||||
|
|
||||||
// Do partial validation on the incomplete
|
// Do partial validation on the incomplete
|
||||||
// code point, this is called "Fail fast"
|
// code point, this is called "Fail fast"
|
||||||
|
Reference in New Issue
Block a user