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 abort code parsing #28

Merged
merged 6 commits into from
Mar 17, 2023
Merged

Fix abort code parsing #28

merged 6 commits into from
Mar 17, 2023

Conversation

jamwaffles
Copy link
Collaborator

Abort codes would fail to parse when an expedited download was aborted. The return type would steal the abort code bytes as its payload, leaving the AbortCode parsing with zeroes. This is fixed now.

Abort codes can now never fail to parse. Instead, an unknown abort code will be parsed as AbortCode::Unknown(u32) and displayed like 0x12345678: Unknown code

Closes #27

This was causing the first 4 bytes in an aborted request (which contain the error code) to be eaten by what should just be the header. This meant that the data read was 4 bytes ahead of where it should be, causing the error code to be read as 0x00000000.
@jamwaffles jamwaffles marked this pull request as ready for review March 17, 2023 19:40
@jamwaffles jamwaffles merged commit 27b505d into master Mar 17, 2023
@jamwaffles jamwaffles deleted the fix-abort-code-parsing branch March 17, 2023 19:43
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.

See if it's possible to report a better error for incorrect datatypes
1 participant