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

DiscIO: Improve error handling for reading integers #3127

Merged
merged 4 commits into from
Dec 15, 2015

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Oct 3, 2015


bool CBlobBigEndianReader::Read16(u64 offset, u16* buffer) const
{
if (!m_reader.Read(offset, sizeof(u16), (u8*)buffer))

This comment was marked as off-topic.

@JosJuice JosJuice force-pushed the read-return branch 5 times, most recently from 94423eb to 21c8743 Compare October 3, 2015 19:26
@shuffle2
Copy link
Contributor

shuffle2 commented Oct 3, 2015

Fixes the crash when loading game list.
Still crashes when trying to run, but I think that's OK for now...

@JMC47
Copy link
Contributor

JMC47 commented Nov 18, 2015

Any reason not to merge this?


bool Read32(u64 offset, u32* buffer) const;
bool Read16(u64 offset, u16* buffer) const;
bool Read8(u64 offset, u8* buffer) const;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@degasus
Copy link
Member

degasus commented Dec 2, 2015

LGTM

@JosJuice JosJuice force-pushed the read-return branch 2 times, most recently from b61f46b to 91b78e9 Compare December 2, 2015 22:04
@bb010g
Copy link
Contributor

bb010g commented Dec 14, 2015

Bump

Callers can now check whether reads fail, either by checking the return
value or by setting the buffer to a known bad value and seeing if it stays
untouched. I've added error checks to FileSystemGCWii and Boot_BS2Emu,
but not to Boot since it doesn't check any of its other reads either.
@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

  • aeon-charge-attack on ogl-lin-nv: diff

automated-fifoci-reporter

degasus added a commit that referenced this pull request Dec 15, 2015
DiscIO: Improve error handling for reading integers
@degasus degasus merged commit 25a5846 into dolphin-emu:master Dec 15, 2015
@JosJuice JosJuice deleted the read-return branch December 15, 2015 17:27
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants