Skip to content
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

CAT_VAR_BUF_HEX Doesn't allow for uneven hex values. #46

Open
juser19201 opened this issue Sep 7, 2023 · 2 comments
Open

CAT_VAR_BUF_HEX Doesn't allow for uneven hex values. #46

juser19201 opened this issue Sep 7, 2023 · 2 comments

Comments

@juser19201
Copy link

Hello,

While using your library, i've been trying to send hex values into a buffer using CAT_VAR_BUF_HEX. Every hex value i send over has to be even, for example if i send 0x123 it will ERROR, this needs to be changed to 0x1230.

@marcinbor85
Copy link
Owner

marcinbor85 commented Sep 7, 2023

0x123 is rather 0x0123, not 0x1230. is this a serious limitation? hex arrays are parsed runtime without buffering. so we dont know the final size of the array. so starting parsing from 123 we dont know if it is 0x01 or 0x12 at the beginning until we reach the end of the array. but at the end we cannot simply add "0" because the 0x123 is the different value than 0x1230. Thats why it accepts only even hex values.

@juser19201
Copy link
Author

Yes i stand corrected, i meant to say 0x0123. I still think that while this isn't a major limitation, if it is something you'd rather not change then somewhere in the documentation this should be stated, to remove any potential confusion in the future for new people using your library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants