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

VSA not working as expected. #10

Open
Hadatko opened this issue Dec 19, 2019 · 2 comments
Open

VSA not working as expected. #10

Hadatko opened this issue Dec 19, 2019 · 2 comments

Comments

@Hadatko
Copy link

Hadatko commented Dec 19, 2019

Demo:

struct A
{
    uint8 a;
    uint8 b[];
};

The expected behavior of:
cparser.A(b'\x01\x02\x03\x04\x00\x00')
should be

struct A:
- a: 0x1
- b: [2, 3, 4, 0, 0]

current

struct A:
- a: 0x1
- b: [2, 3, 4]

It should take rest of binary data which are at the end of blob (here 5bytes) and count how much numbers he can take (5/1{uint8}) and than convert data at the end.

@Hadatko
Copy link
Author

Hadatko commented Dec 19, 2019

I have patch for this. I will post it tomorrow. But i found out that it is not working for dynamic array of structures. Will figure out tomorrow.

@Hadatko
Copy link
Author

Hadatko commented Dec 20, 2019

This patch is fixing VSA for both array of numbers and structures...

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

1 participant