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

Move value parsing into its own function #18

Merged
merged 2 commits into from
Aug 2, 2023
Merged

Conversation

Schamper
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #18 (7162449) into main (6758cb2) will increase coverage by 0.25%.
The diff coverage is 5.88%.

@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   52.18%   52.44%   +0.25%     
==========================================
  Files           4        4              
  Lines         389      389              
==========================================
+ Hits          203      204       +1     
+ Misses        186      185       -1     
Flag Coverage Δ
unittests 52.44% <5.88%> (+0.25%) ⬆️

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

Files Changed Coverage Δ
dissect/regf/regf.py 49.17% <5.88%> (+0.27%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

dissect/regf/regf.py Outdated Show resolved Hide resolved
Comment on lines +510 to +515
while data.tell() < data_len:
string = read_null_terminated_wstring(data)
if string == "":
break

multi_string.append(string)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
while data.tell() < data_len:
string = read_null_terminated_wstring(data)
if string == "":
break
multi_string.append(string)
while string := read_null_terminated_wstring(data):
multi_string.append(string)

Wouldn't something like this do the same thing?

Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't that just error at the end of the data?

Copy link
Member Author

Choose a reason for hiding this comment

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

I also don't intend to make much changes to how the function works.

dissect/regf/regf.py Show resolved Hide resolved
dissect/regf/regf.py Outdated Show resolved Hide resolved
@Schamper Schamper requested a review from Miauwkeru July 28, 2023 14:04
@Schamper Schamper merged commit 14cfb86 into main Aug 2, 2023
17 of 18 checks passed
@Schamper Schamper deleted the move-parse-value branch August 2, 2023 13:33
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.

None yet

3 participants