diff --git a/src/libSchnorr/src/Schnorr_PubKey.cpp b/src/libSchnorr/src/Schnorr_PubKey.cpp index 01c3b52..6e39ea1 100644 --- a/src/libSchnorr/src/Schnorr_PubKey.cpp +++ b/src/libSchnorr/src/Schnorr_PubKey.cpp @@ -113,7 +113,7 @@ bool PubKey::Serialize(bytes& dst, unsigned int offset) const { bool PubKey::Deserialize(const bytes& src, unsigned int offset) { shared_ptr result = - ECPOINTSerialize::GetNumber(src, offset, PUB_KEY_SIZE); + ECPOINTSerialize::GetNumber(src, offset, src.size()); if (result == nullptr) { // ECPOINTSerialize::GetNumber failed