VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index cc66506c..246f35a6 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -10733,32 +10733,32 @@ std::string FindLatestFileOrDirectory (const std::string &directory, const char
return string (directory) + "\\" + name;
}
int GetPin (HWND hwndDlg, UINT ctrlId)
{
int pin = 0;
if (IsWindowEnabled (GetDlgItem (hwndDlg, ctrlId)))
{
- char szTmp[MAX_PIN + 1] = {0};
- if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIN + 1) > 0)
+ char szTmp[MAX_PIM + 1] = {0};
+ if (GetDlgItemText (hwndDlg, ctrlId, szTmp, MAX_PIM + 1) > 0)
{
char* endPtr = NULL;
pin = strtol(szTmp, &endPtr, 10);
if (pin < 0 || endPtr == szTmp || !endPtr || *endPtr != '\0')
pin = 0;
}
}
return pin;
}
void SetPin (HWND hwndDlg, UINT ctrlId, int pin)
{
if (pin > 0)
{
- char szTmp[MAX_PIN + 1];
+ char szTmp[MAX_PIM + 1];
StringCbPrintfA (szTmp, sizeof(szTmp), "%d", pin);
SetDlgItemText (hwndDlg, ctrlId, szTmp);
}
else
SetDlgItemText (hwndDlg, ctrlId, "");
}