Fix condition in ParsedJson::allocate_capacity(). (#283)

This commit is contained in:
Vitaly Baranov 2019-08-16 15:38:59 +03:00 committed by Daniel Lemire
parent c8d50a6060
commit e9be643db5
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ bool ParsedJson::allocate_capacity(size_t len, size_t max_depth) {
if (len > SIMDJSON_MAXSIZE_BYTES) { if (len > SIMDJSON_MAXSIZE_BYTES) {
return false; return false;
} }
if ((len <= byte_capacity) && (depth_capacity < max_depth)) { if ((len <= byte_capacity) && (max_depth <= depth_capacity)) {
return true; return true;
} }
deallocate(); deallocate();