Skip to content

Commit

Permalink
fix array declaration for broken msvc static expression evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-ape committed Aug 26, 2019
1 parent 1d2d9bf commit 5bb0254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/elliptic_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ namespace fc { namespace ecc {

static std::string _to_base58( const extended_key_data& key )
{
char buffer[key.size() + 4]; // it's a small static array => allocate on stack
char buffer[std::tuple_size<extended_key_data>::value + 4]; // it's a small static array => allocate on stack
memcpy( buffer, key.data(), key.size() );
fc::sha256 double_hash = fc::sha256::hash( fc::sha256::hash( (char*)key.data(), key.size() ));
memcpy( buffer + key.size(), double_hash.data(), 4 );
Expand Down

0 comments on commit 5bb0254

Please sign in to comment.