mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-02 19:32:11 +01:00
d6b6b070bc
pSysMem is of the type const void* -- because of this, it makes the original delete[] call undefined behavior, as deleting a void pointer is undefined behavior. Also punning types into existence, like what was done for the stereo image header is undefined behavior as well. The proper way to do this is to either manually add all individual bytes manually, or memcpy the struct into memory. As we want to deallocate the memory before returning, and because pSysMem is a const void*, we keep a unique_ptr to the data and just pass pSysMem a raw pointer to the data. |
||
---|---|---|
.. | ||
Android | ||
Core | ||
DSPSpy | ||
DSPTool | ||
PCH | ||
UnitTests | ||
VSProps | ||
.clang-format | ||
CMakeLists.txt | ||
dolphin-emu.sln |