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

MemoryWidget: Simplify the search logic #10081

Merged
merged 1 commit into from Sep 20, 2021

Conversation

sepalani
Copy link
Contributor

@sepalani sepalani commented Sep 1, 2021

This PR fixes leading nul bytes being ignored in hex search. It also simplifies and deduplicates some of the code logic.

Ready to be reviewed.

Copy link
Contributor

@iwubcode iwubcode left a comment

Choose a reason for hiding this comment

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

Untested

Copy link
Contributor

@Dentomologist Dentomologist left a comment

Choose a reason for hiding this comment

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

Good catch on the leading nulls; they now work as expected.

Instead of needing to call IsValueValid before GetValueData, what do you think about having a single function TryGetValueBytes (or whatever) that returns an optional QByteArray?

Source/Core/DolphinQt/Debugger/MemoryWidget.cpp Outdated Show resolved Hide resolved
Source/Core/DolphinQt/Debugger/MemoryWidget.cpp Outdated Show resolved Hide resolved
@sepalani
Copy link
Contributor Author

@Dentomologist Done.

I don't think making a single function TryGetValueBytes is a good idea since I need IsValueValid for the search validation function (where I don't need the actual data).

Fix leading nul bytes being ignored in hex search
@sepalani
Copy link
Contributor Author

@leoetlino Done.

@leoetlino leoetlino merged commit 22f7c07 into dolphin-emu:master Sep 20, 2021
10 checks passed
@sepalani sepalani deleted the mem-hex0 branch September 21, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants