mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
apparently 3AM is not the time to code (nw)
This commit is contained in:
parent
9525108f78
commit
8c4f10d3aa
@ -15,10 +15,10 @@ std::uint8_t g_mame_new_prefill_byte(0xcd);
|
||||
void *operator new(std::size_t n)
|
||||
{
|
||||
void *const result(std::malloc(n));
|
||||
if (ptr)
|
||||
if (result)
|
||||
{
|
||||
std::fill_n(reinterpret_cast<std::uint8_t volatile *>(ptr), n, g_mame_new_prefill_byte);
|
||||
return ptr;
|
||||
std::fill_n(reinterpret_cast<std::uint8_t volatile *>(result), n, g_mame_new_prefill_byte);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user