Skip to content

Commit

Permalink
need to set the size, not just reserve
Browse files Browse the repository at this point in the history
  • Loading branch information
nrnhines committed Dec 28, 2023
1 parent 02a9d42 commit f0d8bdb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/nrniv/bbsavestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<double> seq34{};
seq34.reserve(size_random);
std::vector<double> seq34(size_random, 0);
for (auto i = 0; i < size_random; ++i) {
tmp.push_back(static_cast<double*>(&seq34[i]));
}
Expand Down

0 comments on commit f0d8bdb

Please sign in to comment.