From f0d8bdb93f9d16f8cc638fa760a3528fc5c0fcde Mon Sep 17 00:00:00 2001 From: Michael Hines Date: Thu, 28 Dec 2023 07:49:13 -0500 Subject: [PATCH] need to set the size, not just reserve --- src/nrniv/bbsavestate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nrniv/bbsavestate.cpp b/src/nrniv/bbsavestate.cpp index 5964e49180..24b7497b9c 100644 --- a/src/nrniv/bbsavestate.cpp +++ b/src/nrniv/bbsavestate.cpp @@ -2081,8 +2081,7 @@ void BBSaveState::mech(Prop* p) { // read or write the RANDOM 34 sequence values by pointing last // size_random tmp elements to seq34 double slots. - std::vector seq34{}; - seq34.reserve(size_random); + std::vector seq34(size_random, 0); for (auto i = 0; i < size_random; ++i) { tmp.push_back(static_cast(&seq34[i])); }