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

Possible restore bug in su_load_gmdls #130

Closed
mrange opened this issue Jan 28, 2024 · 5 comments
Closed

Possible restore bug in su_load_gmdls #130

mrange opened this issue Jan 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mrange
Copy link

mrange commented Jan 28, 2024

Hi.

Big fan of the sound and size of sointu. I thought I noticed one possible issue in su_load_gmdls.

In my version it does

mov     ebx, su_sample_table

but AFAICT it doesn't restore ebx.

In certain configs this fails for me as calling code don't expect rbx to be modified.

When I removed that row and instead

push    ebx

does this:

push    su_sample_table

it seems to resolve the issue for me.

So I have a workaround so it's not a big issue for me.

@vsariola
Copy link
Owner

Oops. I need to read more carefully what the 32-bit calling convention says. Thanks for reporting!

@vsariola vsariola added the bug Something isn't working label Jan 29, 2024
@vsariola
Copy link
Owner

Pushad / Popad is also only two bytes (uncompressed) so that might also work

@vsariola
Copy link
Owner

Should be fixed. Please test and report if this continues to be an issue.

@vsariola
Copy link
Owner

I push most of the arguments to ReadFile first so we can use only eax (which is free to trash) for the su_sample_table pointer; this way I don't have to trust OpenFile not touching anything if its implementation changes. Only the return value of OpenFile is pushed after its called.

@mrange
Copy link
Author

mrange commented Feb 16, 2024

Hi. I will make a try to see if it works. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants