mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-01-11 01:02:14 +00:00
Fix segfault when using defaultModsPath on Windows
This commit is contained in:
parent
469e4ac4e4
commit
fee9bfebfa
1 changed files with 4 additions and 1 deletions
|
|
@ -147,7 +147,10 @@ void mods_init(void) {
|
|||
|
||||
// load mods
|
||||
if (hasUserPath) { mods_load(&gLocalMods, userModPath); }
|
||||
mods_load(&gLocalMods, "./" MOD_DIRECTORY);
|
||||
char defaultModsPath[SYS_MAX_PATH] = { 0 };
|
||||
if (snprintf(defaultModsPath, SYS_MAX_PATH - 1, "%s", "./" MOD_DIRECTORY) >= 0) {
|
||||
mods_load(&gLocalMods, defaultModsPath);
|
||||
}
|
||||
|
||||
// calculate total size
|
||||
gLocalMods.size = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue