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 crash with incorrect argv[0]: rewrite it only if "box86" is present #1020

Merged
merged 1 commit into from
Jan 4, 2025

Conversation

ValdikSS
Copy link
Contributor

@ValdikSS ValdikSS commented Jan 4, 2025

This resolves funny crash if there's no '8' in argv[0].

@ValdikSS
Copy link
Contributor Author

ValdikSS commented Jan 4, 2025

The same issue in box64:

my_context->box86path = box_strdup(my_context->box64path);
#ifndef BOX32
char* p = strrchr(my_context->box86path, '6');  // get the 6 of box64
p[0] = '8'; p[1] = '6'; // change 64 to 86

https://github.com/ptitSeb/box64/blob/5fa65a4b38c1a449af3703a3f760eb09bc9dbca8/src/core.c#L2143-L2146

@ptitSeb ptitSeb merged commit d940221 into ptitSeb:master Jan 4, 2025
36 checks passed
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