-
Notifications
You must be signed in to change notification settings - Fork 180
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
Remove 128 character buffer causing long filenames to crash gk #3771
Conversation
Can one of the admins verify this patch? |
Before TestI verified the issue is reproducible with the following command:
Here are the last few console lines, showing the app halting right as it tries to run
After TestI'll now rename my repository folder back to what it was so I can rebuild Indeed, the game now boots in retail mode correctly with the same command as before. I've also verified that the settings file is being read correctly, as the options I expect to see in-game are there. Here are the few console lines that come after reading the too-long archipelago settings file path:
If there's another test I should do, perhaps a negative test, let me know! |
add to whitelist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Several users have reported that ArchipelaGOAL is not launching properly, even when using the OpenGOAL Launcher. The window pops up with a black screen, and then quits. The only way they can run it is if they double click gk.exe.
This comes down to the Launcher providing gk.exe with the
config_path
parameter, which leads the program to findarchipelagoal-settings.gc
. Here is an example from me:If a user's base OpenGOAL install directory is long enough, this path becomes longer than 128 characters. This overflows the character buffer in
kopen
which is used to open file streams. If you're only slightly over the limit like myself, at 135 characters, you may not have noticed a problem. But some users have paths a little longer, like 168 characters, and they report the issue is consistent.Water111 suggested we remove the 128 character buffer and use the filename data directly. This fix requires no changes to the Launcher, just to the kernel, and every mod could stand to benefit from this fix.