mirror of https://github.com/x64dbg/zydis
Fixed `ZydisMemorySet` implementation
This commit is contained in:
parent
df949a5eb0
commit
f1316c434e
|
@ -55,7 +55,7 @@
|
||||||
ZYDIS_INLINE void* ZydisMemorySet(void* ptr, int value, size_t num)
|
ZYDIS_INLINE void* ZydisMemorySet(void* ptr, int value, size_t num)
|
||||||
{
|
{
|
||||||
uint8_t c = value & 0xff;
|
uint8_t c = value & 0xff;
|
||||||
for (uint8_t* p = (uint8_t*)ptr; *p; ++p) *p = c;
|
for (size_t i = 0; i < num; ++i) ((uint8_t*)ptr)[i] = c;
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue