From: svost Date: Sun, 13 Mar 2016 20:11:27 +0000 (+0300) Subject: Switch nSize to size_t X-Git-Tag: nvc-v0.5.6~4^2~1 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=06b83ae8a9cdb61724534ec3d8a683b306eb1b36 Switch nSize to size_t Based on: EC_POINT_point2oct return size_t void resize (size_type n, value_type val = value_type()); --- diff --git a/src/key.cpp b/src/key.cpp index 2232324..546d95f 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -612,7 +612,7 @@ bool CPoint::setPubKey(const CPubKey &vchPubKey) // Serialize to octets stream bool CPoint::getBytes(std::vector &vchBytes) { - unsigned int nSize = EC_POINT_point2oct(group, point, POINT_CONVERSION_COMPRESSED, NULL, 0, ctx); + size_t nSize = EC_POINT_point2oct(group, point, POINT_CONVERSION_COMPRESSED, NULL, 0, ctx); vchBytes.resize(nSize); if (!(nSize == EC_POINT_point2oct(group, point, POINT_CONVERSION_COMPRESSED, &vchBytes[0], nSize, ctx))) { return false; @@ -1243,4 +1243,4 @@ void CKey::DecryptData(const std::vector& encrypted, std::vector< data.resize(length); memcpy(&data[0], decrypted, length); free(decrypted); -} \ No newline at end of file +}