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

jvshost: Fix size of encoded packet with escaped bytes #10557

Merged
merged 1 commit into from
Nov 16, 2022

Conversation

987123879113
Copy link
Contributor

@987123879113 987123879113 commented Nov 16, 2022

The size of the encoded packet returned by the encode function was off by the number of bytes that were escaped. This issue is only seen when a raw packet includes bytes that need to be escaped (0xd0 or 0xe0).

The add variable is added to the output size variable after the loop but since the add variable is directly decremented every time a byte is escaped in the loop, the final size += add turns into size += 0.

@ajrhacker ajrhacker merged commit 2059167 into mamedev:master Nov 16, 2022
@987123879113 987123879113 deleted the jvshost_fix_escaped_size branch November 29, 2022 16:56
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.

2 participants