Fixes crash when modifying functions in Rocksmith.
| 117 | /// Fixes crash when modifying functions in Rocksmith. |
| 118 | /// </summary> |
| 119 | void FixModifyingFunctions() { |
| 120 | uintptr_t forceSuccessLSBOffset = Offsets::ptr_ModdedPtrCrashFix.Get() + 0x3; // LSB of the MOV is what we are replacing |
| 121 | byte forceFailedLSB = MemUtil::ReadValue<byte>(forceSuccessLSBOffset + 0x14, true); // We are replacing it with ForceFailed LSB, which is 0x14 away |
| 122 | MemUtil::PatchAdr(forceSuccessLSBOffset, (LPVOID)&forceFailedLSB, 1, true); |
| 123 | } |
| 124 | } |