Add a check to stop a possible bug.

svn path=/trunk/; revision=21212
This commit is contained in:
Ged Murphy 2006-02-26 23:18:36 +00:00
parent 018e66e64d
commit cff26aaf48

View file

@ -574,7 +574,7 @@ CreateNTPServerList(HWND hwnd)
DWORD Index = 0;
DWORD ValSize;
DWORD dwNameSize;
DWORD Default = 0;
DWORD Default = 1;
LONG Ret;
HKEY hKey;
@ -618,6 +618,9 @@ CreateNTPServerList(HWND hwnd)
break;
}
if (Default < 1 || Default > Index)
Default = 1;
SendMessage(hList, CB_SETCURSEL, --Default, 0);
}