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

Fix colored hexdumps for zero-length field values #84

Merged

Conversation

MaxGroot
Copy link
Contributor

Fix a (very, very) minor bug in dumpstruct for structure instances where field values are of length 0. In such situations, the coloring scheme of the hexdump currently 'hangs'. See the screenshot below:

Screenshot from 2024-04-22 20-56-14
main on the left, the branch for this PR on the right. The difference is in line 10.

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 89.32%. Comparing base (6a6cde0) to head (581aff0).

Files Patch % Lines
dissect/cstruct/utils.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   89.50%   89.32%   -0.19%     
==========================================
  Files          21       21              
  Lines        1924     1929       +5     
==========================================
+ Hits         1722     1723       +1     
- Misses        202      206       +4     
Flag Coverage Δ
unittests 89.32% <20.00%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Schamper Schamper merged commit 95a4928 into fox-it:main Apr 25, 2024
14 checks passed
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

Successfully merging this pull request may close these issues.

3 participants