-
Notifications
You must be signed in to change notification settings - Fork 96
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
RFC 7049 conformance issues #5
Comments
Maybe something went wrong with the compilation, you could try #8 |
I have also seen the "First" issue described above for input: 100000.0 |
@ekroon it's indeed possible this is related to #8. #ifdef HAVE_ENDIAN_H
} |
Yes, I'm on 0.3.1 and IS_BIG_ENDIAN is incorrectly true for the XCode Simulator. |
Issue is likely all #ifdef IS_BIG_ENDIAN should be changed to #if IS_BIG_ENDIAN. |
Recently tried wrap your lib in objective - c (for iOS/MAC OS client - server exchange purposes) and bump into couple issues conformance with RFC 7049 standard.
First: wrong byte order after encoding
RFC 7049, Appendix A
Result binary data (in ascii hex): 0x1a40420f00
Must be (according to RFC 7049): 0x1a000f4240
_All bytes after first byte in reverse order._
Second: negative values of all wides of integers encoding incorrect. For example, if I even reorder bytes in correct way - result not confirms to RFC 7049:
Result binary data (in ascii hex): 0x39fc18
Must be (according to RFC 7049): 0x3903e7
Third: floats encoding into something absolutely crazy. But any float encoded before with cbor_build_float4 can't be decoded with cbor_float_get_float4... It always returns 0.0
There is chance, that I am using your lib in some wrong way, but I quit trying understand this... Maybe you can help me?
The text was updated successfully, but these errors were encountered: