Skip to content

Commit

Permalink
Merge pull request #153 from crypto-ape/fix_for_msvc_broken_static_ev…
Browse files Browse the repository at this point in the history
…aluation_in_array_declaration

Fix Compilation with MSVC
  • Loading branch information
pmconrad authored Aug 30, 2019
2 parents 7954c4a + 5bb0254 commit 9e81e1d
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 9e81e1d

Please sign in to comment.