Fixes wiimenu on 32bit caused by not allocating enough memory for GetAdaptersInfo.

Fixes issue 2672.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5459 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2010-05-19 03:23:01 +00:00
parent 2c7a08fc61
commit 866e127510
1 changed files with 3 additions and 2 deletions

View File

@ -312,7 +312,7 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
}
close(fd);
#elif defined(WIN32)
#elif defined(_WIN32)
IP_ADAPTER_INFO *adapter_info = NULL;
DWORD len = 0;
@ -323,7 +323,8 @@ bool CWII_IPC_HLE_Device_net_ncd_manage::IOCtlV(u32 _CommandAddress)
break;
}
adapter_info = new IP_ADAPTER_INFO[len / sizeof(IP_ADAPTER_INFO)];
// LPFaint99: len is sizeof(IP_ADAPTER_INFO) * nics - 0x20
adapter_info = new IP_ADAPTER_INFO[(len / sizeof(IP_ADAPTER_INFO)) + 1];
ret = GetAdaptersInfo(adapter_info, &len);
if (SUCCEEDED(ret)) Memory::WriteBigEData(adapter_info->Address, CommandBuffer.PayloadBuffer.at(1).m_Address, 4);