Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove 128 character buffer causing long filenames to crash gk (#3771)
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 find `archipelagoal-settings.gc`. Here is an example from me: ``` D:\Applications\Games\OpenGOAL\features\jak1\mods\JakMods\_settings\archipelagoal\OpenGOAL\jak1\settings/Mods/archipelagoal-settings.gc ``` 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.
- Loading branch information