Commit 9b2700ca authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1225 from hurtonm/master

Fix issue #1224
parents e9b98607 1fd1d519
......@@ -189,7 +189,8 @@ void zmq::xpub_t::send_unsubscription (unsigned char *data_, size_t size_,
// to be retrived by the user later on.
blob_t unsub (size_ + 1, 0);
unsub [0] = 0;
memcpy (&unsub [1], data_, size_);
if (size_ > 0)
memcpy (&unsub [1], data_, size_);
self->pending_data.push_back (unsub);
self->pending_flags.push_back (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment