Windows stub installer only - plugin code - Bug 850110 - Download server IP address is sometimes reported as a single digit. r=bbondy

This commit is contained in:
Robert Strong 2013-03-17 00:09:35 -07:00
Родитель bbd9251209
Коммит db3f771f92
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -136,10 +136,14 @@ void __stdcall InetStatusCallback(HINTERNET hInternet, DWORD_PTR dwContext,
DWORD dwStatusInformationLength)
{
if (dwInternetStatus == INTERNET_STATUS_NAME_RESOLVED) {
// The documentation states the IP address is a PCTSTR but it is actually a
// PCSTR.
// The documentation states the IP address is a PCTSTR but it is usually a
// PCSTR and only sometimes a PCTSTR.
StatsLock_AcquireExclusive();
wsprintf(g_ServerIP, _T("%S"), lpvStatusInformation);
if (wcslen(g_ServerIP) == 1)
{
wsprintf(g_ServerIP, _T("%s"), lpvStatusInformation);
}
StatsLock_ReleaseExclusive();
}