-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can not use .size n on bytestrings #349
Comments
Is it ever going to be possible to use |
Thanks for the report, apologies for the delay. This is a bug, and should be fixed in #375. Feel free to test and leave a review. |
Confirmed working. However... for CDDL:
I think this is could be slightly better optimized to not be two conditionals that oddly check the size.
This does get to |
I know that a couple of my bytestrings will be of specific size. So I used .size n on them which should be allowed, but there is an error with the generated code getting the structure members wrong.
CDDL:
Generated types file:
Generated decode:
Result:
It's not wrong.
some_label_m
is ofsome_label_s
type and notstruct zcbor_string
type directly, so it does not have a len member. It's like it was supposed to besome_label_m.s.len
The text was updated successfully, but these errors were encountered: