Skip to content

Commit

Permalink
- Forgot to change a doesFileNotExist call
Browse files Browse the repository at this point in the history
- Changed logic for file_exist() to not use double negation, which is confusing.
- Binary added
  • Loading branch information
suloku committed Sep 15, 2015
1 parent 1a20ae8 commit b908936
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/main.c
Expand Up @@ -687,7 +687,7 @@ int main()

consoleSelect(&titleBar);
textcolour(TEAL);
printf("svdt 0.10, meladroit/willidleaway\n");
printf("svdt 0.10.1, meladroit/willidleaway/suloku\n");
printf("a hacked-together save data explorer/manager\n");
gotoxy(CURSOR_WIDTH,2);
textcolour(GREY);
Expand Down
15 changes: 8 additions & 7 deletions source/secure_values.c
Expand Up @@ -78,7 +78,7 @@ int isSecureFile2(const char* destPath, const char* productCode)
{
if (!strncmp(productCode,pokeRumbleWorldCode,9))
return (!strcmp(destPath,POKERW_SVPATH));
if(checkSecureConfig())
if(!checkSecureConfig())
return -1;
if(!secureValueSet)
return -1;
Expand All @@ -98,13 +98,14 @@ int isSecureFile2(const char* destPath, const char* productCode)

Result checkCustomSecureGame()
{
return doesFileNotExist(customSecurePath,&sdmcFsHandle,sdmcArchive);
//return doesFileNotExist(customSecurePath,&sdmcFsHandle,sdmcArchive);
return file_exist(customSecurePath);
}

Result checkSecureConfig()
{
//return doesFileNotExist(secureConfigPath,&sdmcFsHandle,sdmcArchive);
return !file_exist(secureConfigPath);
return file_exist(secureConfigPath);
}

void secureGameFromProductCode(const char* productCode)
Expand All @@ -118,7 +119,7 @@ void secureGameFromProductCode(const char* productCode)
return;
}
// ideally we actually have asr.dat in /3ds/svdt
if(!checkSecureConfig())
if(checkSecureConfig())
{
// and ideally we actually have the product code in there ...
FILE* config = fopen(secureConfigBasename,"rb");
Expand Down Expand Up @@ -151,7 +152,7 @@ void secureGameFromProductCode(const char* productCode)
}
}
// custom specifier does not take precedence over having the actual product code
if(!checkCustomSecureGame())
if(checkCustomSecureGame())
{
whichSecureGame = SECURE_EMERGENCY;
return;
Expand All @@ -164,7 +165,7 @@ void secureGameFromFilesystem()
u64 size = 0;
secureValueSet = 0;
// custom specifier absolutely takes precedence over these guesses
if(!checkCustomSecureGame())
if(checkCustomSecureGame())
{
whichSecureGame = SECURE_EMERGENCY;
return;
Expand Down Expand Up @@ -293,7 +294,7 @@ Result getSecureValue2(const char* productCode)
{
if (!strncmp(productCode,pokeRumbleWorldCode,9))
return getPokeRumbleSecureValue();
if(checkSecureConfig())
if(!checkSecureConfig())
return -1;
//printf("\nopening asr.dat\n");
FILE* config = fopen(secureConfigBasename,"rb");
Expand Down
Binary file modified svdt.3dsx
Binary file not shown.

0 comments on commit b908936

Please sign in to comment.