2
0
mirror of https://github.com/boostorg/json.git synced 2026-02-12 12:12:15 +00:00

array coverage

This commit is contained in:
Vinnie Falco
2019-11-01 11:47:30 -07:00
parent 3150db1069
commit c1ef2ab337
2 changed files with 11 additions and 1 deletions

View File

@@ -621,7 +621,7 @@ reserve_impl(size_type capacity)
// 2x growth
auto const hint = impl_.capacity * 2;
#endif
if(hint < impl_.capacity)
if(hint < impl_.capacity) // overflow
capacity = max_size();
else if(capacity < hint)
capacity = hint;