New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mspack::pack of msgpack::object containing time is wrong #754
Comments
There may also be an error in comparison: bool visit_ext(const char* v, uint32_t size) {
if (m_ptr->type != msgpack::type::EXT ||
m_ptr->via.ext.size != size ||
std::memcmp(m_ptr->via.ext.ptr, v, size) != 0) {
m_result = false;
return false;
}
return true;
}
|
@grmcdorman , thank you for reporting the issue. As you mentioned, it is not only |
I sent the PR #755 to fix the issue. |
Verified that it works for me. Thank you for the quick fix. |
redboltz
added a commit
that referenced
this issue
Jan 8, 2019
Thank you for checking. Merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code:
results in incorrect output; specifically, the output is:
The actual data returned:
C7 05 FF FF 32 BC FE DA
It appears the following code in object.hpp is at fault (line 354 in the current source):
The supplied size is the size including the type byte, but pack_ext and pack_ext_body expect the data-only size. In addition, pack_ext_body is passed the data starting with the type byte.
To correct:
Generic ext-object packing in this fashion will of course also be affected.
The text was updated successfully, but these errors were encountered: