aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script.h b/src/script.h
index 4b29f6273c..e639003549 100644
--- a/src/script.h
+++ b/src/script.h
@@ -348,8 +348,10 @@ public:
CScript& operator<<(const CPubKey& key)
{
- std::vector<unsigned char> vchKey = key.Raw();
- return (*this) << vchKey;
+ assert(key.size() < OP_PUSHDATA1);
+ insert(end(), (unsigned char)key.size());
+ insert(end(), key.begin(), key.end());
+ return *this;
}
CScript& operator<<(const CBigNum& b)