diff --git a/libraries/libfc/src/crypto/elliptic_secp256k1.cpp b/libraries/libfc/src/crypto/elliptic_secp256k1.cpp index 9d490fcbe8..93d7fed8fb 100644 --- a/libraries/libfc/src/crypto/elliptic_secp256k1.cpp +++ b/libraries/libfc/src/crypto/elliptic_secp256k1.cpp @@ -85,7 +85,7 @@ namespace fc { namespace ecc { { private_key ret; do { - RAND_bytes((uint8_t*)ret.my->_key.data(), sizeof(ret.my->_key.data())); + RAND_bytes((uint8_t*)ret.my->_key.data(), ret.my->_key.data_size()); } while(!secp256k1_ec_seckey_verify(detail::_get_context(), (const uint8_t*)ret.my->_key.data())); return ret; }