Fix a warning.

svn path=/trunk/; revision=15606
This commit is contained in:
Filip Navara
2005-05-28 19:38:54 +00:00
parent d11c96fa89
commit 078f2e9f5f
+3 -19
View File
@@ -276,7 +276,7 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
TCHAR ValueString[32];
LPTSTR Remainder;
DWORD Base;
DWORD Value;
DWORD Value = 0;
switch(uMsg) {
case WM_INITDIALOG:
@@ -315,19 +315,11 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
{
if ((len = GetWindowTextLength(hwndValue)))
{
if (!GetWindowText(hwndValue, ValueString, 32))
{
Value = 0;
}
else
if (GetWindowText(hwndValue, ValueString, 32))
{
Value = _tcstoul (ValueString, &Remainder, 10);
}
}
else
{
Value = 0;
}
}
_stprintf (ValueString, _T("%lx"), Value);
SetDlgItemText(hwndDlg, IDC_VALUE_DATA, ValueString);
@@ -343,19 +335,11 @@ INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LP
{
if ((len = GetWindowTextLength(hwndValue)))
{
if (!GetWindowText(hwndValue, ValueString, 32))
{
Value = 0;
}
else
if (GetWindowText(hwndValue, ValueString, 32))
{
Value = _tcstoul (ValueString, &Remainder, 16);
}
}
else
{
Value = 0;
}
}
_stprintf (ValueString, _T("%lu"), Value);
SetDlgItemText(hwndDlg, IDC_VALUE_DATA, ValueString);