mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 13:18:50 +00:00
Fix bug: reuse after free.
static should not have been used here.
This commit is contained in:
parent
6f17342b50
commit
86ee5600dc
1 changed files with 4 additions and 3 deletions
|
@ -787,9 +787,10 @@ bool CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = GetUsbPointer();
|
CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = GetUsbPointer();
|
||||||
bool* wiiMoteConnected = new bool[s_Usb->m_WiiMotes.size()];
|
size_t size = s_Usb->m_WiiMotes.size();
|
||||||
for (unsigned int i = 0; i < s_Usb->m_WiiMotes.size(); i++)
|
bool* wiiMoteConnected = new bool[size];
|
||||||
|
for (unsigned int i = 0; i < size; i++)
|
||||||
wiiMoteConnected[i] = s_Usb->m_WiiMotes[i].IsConnected();
|
wiiMoteConnected[i] = s_Usb->m_WiiMotes[i].IsConnected();
|
||||||
|
|
||||||
std::string tContentFile(m_ContentFile.c_str());
|
std::string tContentFile(m_ContentFile.c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue