mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 05:17:44 -07:00
Merge pull request #13047 from mitaclaw/cached-interpreter-memcpy-ub
CachedInterpreterEmitter: Fix `std::memcpy` UB
This commit is contained in:
commit
95fac2a4e7
@ -19,6 +19,8 @@ void CachedInterpreterEmitter::Write(AnyCallback callback, const void* operands,
|
||||
}
|
||||
std::memcpy(m_code, &callback, sizeof(callback));
|
||||
m_code += sizeof(callback);
|
||||
if (size == 0)
|
||||
return;
|
||||
std::memcpy(m_code, operands, size);
|
||||
m_code += size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user