diff options
Diffstat (limited to 'src/msg.cpp')
-rw-r--r-- | src/msg.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/msg.cpp b/src/msg.cpp index d395d2b..caee1c7 100644 --- a/src/msg.cpp +++ b/src/msg.cpp @@ -1,11 +1,13 @@ +#include "salticidae/config.h" #ifdef SALTICIDAE_CBINDINGS #include "salticidae/msg.h" extern "C" { msg_t *msg_new(_opcode_t opcode, bytearray_t *_moved_payload) { - auto res = new msg_t(opcode, *payload); - bytearray_free(payload); + auto res = new msg_t(opcode, std::move(*_moved_payload)); + bytearray_free(_moved_payload); + return res; } datastream_t *msg_get_payload(const msg_t *msg) { |