Improve check_bounds init check.
This commit is contained in:
committed by
Matthew Parkinson
parent
419347ba4a
commit
ef64f6c31b
@@ -137,7 +137,7 @@ namespace
|
||||
auto& alloc = ThreadAlloc::get();
|
||||
void* p = const_cast<void*>(ptr);
|
||||
|
||||
if (SNMALLOC_UNLIKELY(alloc.remaining_bytes(ptr) < len))
|
||||
if (SNMALLOC_UNLIKELY(!alloc.check_bounds(ptr, len)))
|
||||
{
|
||||
if constexpr (FailFast)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user