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

MID1202 Failed Parsing due Incorrect Length Size #94

Closed
OscardLucas opened this issue Nov 14, 2022 · 0 comments
Closed

MID1202 Failed Parsing due Incorrect Length Size #94

OscardLucas opened this issue Nov 14, 2022 · 0 comments
Assignees
Labels

Comments

@OscardLucas
Copy link

OscardLucas commented Nov 14, 2022

Description

Due package size is taken by package.Length and not by Header.Length an exception Argument of out range is thrown.
Header Size ignores the NUL value.

Solution in Mid1202 Parse method

replace: variableDataField.Size = package.Length - variableDataField.Index;
with: variableDataField.Size = Header.Length - variableDataField.Index;

Expected behavior

MID1202 Parsed properly

Additional Information

Bug solved on issue #59

Thanks for the library it has helped me a lot.

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

No branches or pull requests

2 participants