mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Fix condition in ParsedJson::allocate_capacity(). (#283)
This commit is contained in:
committed by
Daniel Lemire
parent
c8d50a6060
commit
e9be643db5
+1
-1
@@ -36,7 +36,7 @@ bool ParsedJson::allocate_capacity(size_t len, size_t max_depth) {
|
||||
if (len > SIMDJSON_MAXSIZE_BYTES) {
|
||||
return false;
|
||||
}
|
||||
if ((len <= byte_capacity) && (depth_capacity < max_depth)) {
|
||||
if ((len <= byte_capacity) && (max_depth <= depth_capacity)) {
|
||||
return true;
|
||||
}
|
||||
deallocate();
|
||||
|
||||
Reference in New Issue
Block a user