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

lufia2ac: prevent 0 byte reads #3168

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

el-u
Copy link
Collaborator

@el-u el-u commented Apr 17, 2024

What is this fixing or adding?

One of the SRAM reads in the client is implemented using a variable size; that size can be 0.
This doesn't seem to be a problem for luabridge-based emulator connections, which simply return a 0 byte result in that case.
But when such a read command with size 0 is sent to snes9x-nwa it causes an error and a disconnect.
We can avoid this entirely by performing the read only if the size is greater than 0.

How was this tested?

https://discord.com/channels/731205301247803413/1229626698216116265/1229936513299779584

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Apr 17, 2024
@ScipioWright ScipioWright added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Apr 18, 2024
@Berserker66 Berserker66 merged commit 52c1b04 into ArchipelagoMW:main Apr 18, 2024
16 checks passed
@el-u el-u deleted the lufia2ac-nwa branch April 18, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants