moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
304 stars 100 forks source link

Fix binaryVarPrefixer to work with more bytes than prefix #212

Closed FacundoMora closed 1 year ago

FacundoMora commented 1 year ago

Adjusts the length decoding, the previous implementation only works when the data provided only has the length bytes, being the real case scenario when data always haves more data than the prefix bytes.

To adjust this issue was necessary to cut the amount of bytes corresponding to the digits attribute from the data provided.

adamdecaf commented 1 year ago

Thanks for fixing this @FacundoMora!

codecov-commenter commented 1 year ago

Codecov Report

Base: 73.29% // Head: 73.31% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (80b18fa) compared to base (bb0b3da). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head 80b18fa differs from pull request most recent head 358f6c0. Consider uploading reports for the commit 358f6c0 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #212 +/- ## ========================================== + Coverage 73.29% 73.31% +0.01% ========================================== Files 41 41 Lines 1985 1986 +1 ========================================== + Hits 1455 1456 +1 Misses 325 325 Partials 205 205 ``` | [Impacted Files](https://codecov.io/gh/moov-io/iso8583/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io) | Coverage Δ | | |---|---|---| | [prefix/binary.go](https://codecov.io/gh/moov-io/iso8583/pull/212?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io#diff-cHJlZml4L2JpbmFyeS5nbw==) | `64.00% <100.00%> (+0.73%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=moov-io)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.