Browse Source

Auto merge of #1230 - rcseacord:rcseacord-patch-1, r=str4d

Address incorrect use of shared_ptr in equihash.cpp

Closes #1214
pull/145/head
zkbot 8 years ago
parent
commit
cdc01fad17
  1. 2
      src/crypto/equihash.cpp

2
src/crypto/equihash.cpp

@ -200,7 +200,7 @@ TruncatedStepRow<WIDTH>& TruncatedStepRow<WIDTH>::operator=(const TruncatedStepR
template<size_t WIDTH>
std::shared_ptr<eh_trunc> TruncatedStepRow<WIDTH>::GetTruncatedIndices(size_t len, size_t lenIndices) const
{
std::shared_ptr<eh_trunc> p (new eh_trunc[lenIndices]);
std::shared_ptr<eh_trunc> p (new eh_trunc[lenIndices], std::default_delete<eh_trunc[]>());
std::copy(hash+len, hash+len+lenIndices, p.get());
return p;
}

Loading…
Cancel
Save