Skip to content

Commit 0938a7e

Browse files
committed
Fix a wrong call to resize
1 parent 3afaa72 commit 0938a7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/msgpack23/msgpack23.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ namespace msgpack23 {
245245
throw std::length_error("Variant is too long to be serialized.");
246246
}
247247
emplace_integral(index);
248-
data_.resize(data.size() + data.size());
248+
data_.reserve(data.size() + data.size());
249249
data_.insert(data_.end(), data.begin(), data.end());
250250
}
251251

0 commit comments

Comments
 (0)