diff --git a/format.h b/format.h index c94aa8f0..761132ff 100644 --- a/format.h +++ b/format.h @@ -315,7 +315,7 @@ template void Array::append(const T *begin, const T *end) { std::ptrdiff_t num_elements = end - begin; if (size_ + num_elements > capacity_) - Grow(num_elements); + Grow(size_ + num_elements); std::copy(begin, end, CheckPtr(ptr_, capacity_) + size_); size_ += num_elements; }