We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1f05e0d + f141cf5 commit 403f5d6Copy full SHA for 403f5d6
zmq.hpp
@@ -500,8 +500,8 @@ namespace zmq
500
#if ZMQ_VERSION_MAJOR >= 4
501
const char* data = static_cast<const char*>(zmq_msg_data(&eventMsg));
502
zmq_event_t msgEvent;
503
- msgEvent.event = *(uint16_t*)data; data += sizeof(uint16_t);
504
- msgEvent.value = *(int32_t*)data;
+ memcpy(&msgEvent.event, data, sizeof(uint16_t)); data += sizeof(uint16_t);
+ memcpy(&msgEvent.value, data, sizeof(int32_t));
505
zmq_event_t* event = &msgEvent;
506
#else
507
zmq_event_t* event = static_cast<zmq_event_t*>(zmq_msg_data(&eventMsg));
0 commit comments