Windows: Fix regression when creating multiple keyfiles with a fixed size

This commit is contained in:
Mounir IDRASSI 2023-07-02 22:36:33 +02:00
parent 3b80c8416b
commit 0e49b7bc33
No known key found for this signature in database
GPG Key ID: 02C30AE90FAE4A6F

View File

@ -7366,8 +7366,6 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM) GetDlgItem (hwndDlg, IDC_KEYFILES_SIZE), TRUE);
return 1;
}
remainingBytes = keyfilesSize;
}
if (!GetWindowText(GetDlgItem (hwndDlg, IDC_KEYFILES_BASE_NAME), szFileBaseName, TC_MAX_PATH))
@ -7468,9 +7466,10 @@ BOOL CALLBACK KeyfileGeneratorDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
keyfilesSize %= ((KEYFILE_MAX_READ_LEN - 64) + 1);
keyfilesSize += 64;
remainingBytes = keyfilesSize;
}
remainingBytes = keyfilesSize;
do {
rndBytesLength = (int) min (remainingBytes, (unsigned long long) KEYFILE_MAX_READ_LEN);