Loweynet
修订版 | cb7413c6201f109379120f7d11dc37a52b7445dc (tree) |
---|---|
时间 | 2015-02-22 17:17:26 |
作者 | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix bugs of all settings encryption.
@@ -81,7 +81,7 @@ | ||
81 | 81 | // ソフトウェア自動更新 |
82 | 82 | // リリースバージョンはリリース予定年(10進数4桁)+月(2桁)+日(2桁)+通し番号(0スタート2桁)とする |
83 | 83 | // 2014年7月31日中の30個目のリリースは2014073129 |
84 | -#define RELEASE_VERSION_NUM 2015013100 /* リリースバージョン */ | |
84 | +#define RELEASE_VERSION_NUM 2015022200 /* リリースバージョン */ | |
85 | 85 | |
86 | 86 | |
87 | 87 | // SourceForge.JPによるフォーク |
@@ -959,33 +959,36 @@ int LoadRegistry(void) | ||
959 | 959 | IniKanjiCode = KANJI_SJIS; |
960 | 960 | |
961 | 961 | // 全設定暗号化対応 |
962 | - if(GetMasterPasswordStatus() == PASSWORD_OK) | |
962 | + if(Version >= 1990) | |
963 | 963 | { |
964 | - ReadIntValueFromReg(hKey3, "EncryptAll", &EncryptAllSettings); | |
965 | - sprintf(Buf, "%d", EncryptAllSettings); | |
966 | - ReadStringFromReg(hKey3, "EncryptAllDetector", Str, 255); | |
967 | - DecodePassword(Str, Buf2); | |
968 | - EncryptSettings = EncryptAllSettings; | |
969 | - memset(&EncryptSettingsChecksum, 0, 20); | |
970 | - if(strcmp(Buf, Buf2) != 0) | |
964 | + if(GetMasterPasswordStatus() == PASSWORD_OK) | |
971 | 965 | { |
972 | - switch(DialogBox(GetFtpInst(), MAKEINTRESOURCE(corruptsettings_dlg), GetMainHwnd(), AnyButtonDialogProc)) | |
966 | + ReadIntValueFromReg(hKey3, "EncryptAll", &EncryptAllSettings); | |
967 | + sprintf(Buf, "%d", EncryptAllSettings); | |
968 | + ReadStringFromReg(hKey3, "EncryptAllDetector", Str, 255); | |
969 | + DecodePassword(Str, Buf2); | |
970 | + EncryptSettings = EncryptAllSettings; | |
971 | + memset(&EncryptSettingsChecksum, 0, 20); | |
972 | + if(strcmp(Buf, Buf2) != 0) | |
973 | 973 | { |
974 | - case IDCANCEL: | |
975 | - Terminate(); | |
976 | - break; | |
977 | - case IDABORT: | |
978 | - CloseReg(hKey3); | |
979 | - ClearRegistry(); | |
980 | - ClearIni(); | |
981 | - Restart(); | |
982 | - Terminate(); | |
983 | - break; | |
984 | - case IDRETRY: | |
985 | - EncryptSettingsError = YES; | |
986 | - break; | |
987 | - case IDIGNORE: | |
988 | - break; | |
974 | + switch(DialogBox(GetFtpInst(), MAKEINTRESOURCE(corruptsettings_dlg), GetMainHwnd(), AnyButtonDialogProc)) | |
975 | + { | |
976 | + case IDCANCEL: | |
977 | + Terminate(); | |
978 | + break; | |
979 | + case IDABORT: | |
980 | + CloseReg(hKey3); | |
981 | + ClearRegistry(); | |
982 | + ClearIni(); | |
983 | + Restart(); | |
984 | + Terminate(); | |
985 | + break; | |
986 | + case IDRETRY: | |
987 | + EncryptSettingsError = YES; | |
988 | + break; | |
989 | + case IDIGNORE: | |
990 | + break; | |
991 | + } | |
989 | 992 | } |
990 | 993 | } |
991 | 994 | } |