From 06b83ae8a9cdb61724534ec3d8a683b306eb1b36 Mon Sep 17 00:00:00 2001 From: svost Date: Sun, 13 Mar 2016 23:11:27 +0300 Subject: [PATCH] Switch nSize to size_t Based on: EC_POINT_point2oct return size_t void resize (size_type n, value_type val = value_type()); --- src/key.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 +} -- 1.7.1