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

ES: Replace useless asserts with proper checks #4956

Merged
merged 1 commit into from Mar 1, 2017

Conversation

leoetlino
Copy link
Member

It makes absolutely no sense to have asserts for what is obviously an error condition. And they should definitely not cause Dolphin to crash because it assumes that everything is valid, and Dolphin should not report those to the user either, as it is very obviously a bug in the emulated software and there is nothing the user (or we) can do.

This commit replaces all of the request asserts with proper checks and adds missing checks for some ioctlvs. We still do not check sizes yet; this will be done later to keep this easy to review.

@@ -494,8 +498,8 @@ IPCCommandResult ES::ESGetDeviceID(const IOCtlVRequest& request)

IPCCommandResult ES::GetTitleContentsCount(const IOCtlVRequest& request)
{
_dbg_assert_(IOS_ES, request.in_vectors.size() == 1);
_dbg_assert_(IOS_ES, request.io_vectors.size() == 1);
if (!request.HasNumberOfValidVectors(1, 0))

This comment was marked as off-topic.

This comment was marked as off-topic.

@leoetlino leoetlino force-pushed the es-checks branch 3 times, most recently from 8d9648d to 7af150b Compare February 28, 2017 16:46
It makes absolutely no sense to have asserts for what is obviously an
error condition. And they should definitely not cause Dolphin to crash
because it assumes that everything is valid, and Dolphin should not
report those to the user either, as it is very obviously a bug in the
emulated software and there is nothing the user (or we) can do.

This commit replaces all of the request asserts with proper checks
and adds missing checks for some ioctlvs. We still do not check sizes
yet; this will be done later.
@lioncash lioncash merged commit 8364a00 into dolphin-emu:master Mar 1, 2017
@leoetlino leoetlino deleted the es-checks branch March 1, 2017 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants