| 113 | } |
| 114 | |
| 115 | MemoryPatch MemoryPatchMgr::createWithHex(uintptr_t absolute_address, std::string hex) |
| 116 | { |
| 117 | if (!absolute_address || !KittyUtils::String::validateHex(hex)) |
| 118 | return MemoryPatch(); |
| 119 | |
| 120 | std::vector<uint8_t> patch_code(hex.length() / 2); |
| 121 | KittyUtils::Data::fromHex(hex, &patch_code[0]); |
| 122 | |
| 123 | return MemoryPatch(_pMem, absolute_address, patch_code.data(), patch_code.size()); |
| 124 | } |
| 125 | |
| 126 | #ifndef kNO_KEYSTONE |
| 127 |
no test coverage detected