Add ReadBytes function

This commit is contained in:
2025-09-07 22:44:46 +02:00
parent eea0769127
commit a3dd9d8b4a
2 changed files with 15 additions and 0 deletions

View File

@@ -19,6 +19,12 @@ const char* Memory::Float32ToHexBytes(float value) {
return bytes; // pointeur vers les 4 octets bruts
}
std::vector<std::uint8_t> Memory::ReadBytes(const void* addr, std::size_t size) {
std::vector<std::uint8_t> buffer(size);
std::memcpy(buffer.data(), addr, size);
return buffer;
}
void Memory::PatchBytes(void* address, const char* bytes, size_t len)
{
auto it = patches.find(address);