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 enum and flag repr in struct reprs #101

Merged
merged 6 commits into from
Sep 23, 2024
Merged

Conversation

Schamper
Copy link
Member

Fixes #100

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.12%. Comparing base (046dfa5) to head (638a567).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   92.04%   92.12%   +0.07%     
==========================================
  Files          20       20              
  Lines        2137     2146       +9     
==========================================
+ Hits         1967     1977      +10     
+ Misses        170      169       -1     
Flag Coverage Δ
unittests 92.12% <100.00%> (+0.07%) ⬆️

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.

Miauwkeru
Miauwkeru previously approved these changes Sep 23, 2024
@yunzheng
Copy link
Member

yunzheng commented Sep 23, 2024

please also fix the same behavior in dumpstruct()

elif isinstance(value, int):

Example output from a dissect.cobaltstrike test:
image

@yunzheng yunzheng self-requested a review September 23, 2024 13:53
Copy link
Member

@yunzheng yunzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also fix the behaviour in dumpstruct()

@Schamper
Copy link
Member Author

@yunzheng should be fixed now too.

Copy link
Member

@yunzheng yunzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this is now fixed in both repr and dumpstruct output.

@Schamper Schamper merged commit 09830d2 into main Sep 23, 2024
18 checks passed
@Schamper Schamper deleted the fix-enum-repr-in-struct branch September 23, 2024 16:54
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.

cstruct v4 prints enums as integers instead of the enum itself
3 participants