mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
Core: Default initialize a pointer to nullptr in gdsp_do_dma()
The if-statement implies that this could fail in the switch statement somehow. If it does fail, then we'd be comparing with an uninitialized pointer.
This commit is contained in:
parent
62cc22ac11
commit
3c5326fd38
@ -341,7 +341,7 @@ static void gdsp_do_dma()
|
|||||||
DEBUG_LOG(DSPLLE, "DMA pc: %04x, Control: %04x, Address: %08x, DSP Address: %04x, Size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
|
DEBUG_LOG(DSPLLE, "DMA pc: %04x, Control: %04x, Address: %08x, DSP Address: %04x, Size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const u8* copied_data_ptr;
|
const u8* copied_data_ptr = nullptr;
|
||||||
switch (ctl & 0x3)
|
switch (ctl & 0x3)
|
||||||
{
|
{
|
||||||
case (DSP_CR_DMEM | DSP_CR_TO_CPU):
|
case (DSP_CR_DMEM | DSP_CR_TO_CPU):
|
||||||
|
Loading…
Reference in New Issue
Block a user