forked from boostorg/beast
Fix array end calculation in utf8 assertion
This commit is contained in:
1 parent
20eb6af42d
commit
68727b3cfb
2 files changed
+3
-2
No files matched your search
@@ -194,7 +194,7 @@ write(std::uint8_t const* in, std::size_t size)
|
||||
// Add characters to the code point
|
||||
while(n--)
|
||||
*p_++ = *in++;
|
||||
BOOST_ASSERT(p_ <= cp_ + 5);
|
||||
BOOST_ASSERT(p_ <= cp_ + 4);
|
||||
|
||||
// Still incomplete?
|
||||
if(need_ > 0)
|
||||
@@ -313,7 +313,7 @@ tail:
|
||||
while(n--)
|
||||
*p_++ = *in++;
|
||||
BOOST_ASSERT(in == end);
|
||||
BOOST_ASSERT(p_ <= cp_ + 5);
|
||||
BOOST_ASSERT(p_ <= cp_ + 4);
|
||||
|
||||
// Do partial validation on the incomplete
|
||||
// code point, this is called "Fail fast"
|
||||
|
||||
Reference in new issue
Block a user