diff --git a/source/game/gameutil.c b/source/game/gameutil.c index 7889ec5..6675f0d 100644 --- a/source/game/gameutil.c +++ b/source/game/gameutil.c @@ -1669,6 +1669,10 @@ u32 BuildTitleKeyInfo(const char* path, bool dec, bool dump) { const char* path_in = path; UINT br; + // write permissions + if (!CheckWritePermissions(path_out)) + return 1; + if (!path_in && !dump) { // no input path given - initialize memset(tik_info, 0, 16); if ((fvx_stat(path_out, NULL) == FR_OK) && @@ -1737,6 +1741,10 @@ u32 BuildSeedInfo(const char* path, bool dump) { u32 inputtype = 0; // 0 -> none, 1 -> seeddb.bin, 2 -> seed system save UINT br; + // write permissions + if (!CheckWritePermissions(path_out)) + return 1; + if (!path_in && !dump) { // no input path given - initialize memset(seed_info, 0, 16); if ((fvx_stat(path_out, NULL) == FR_OK) &&