MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Patch_VerifyLocation

Function Patch_VerifyLocation

Source/OSHLE/patch.cpp:718–742  ·  view source on GitHub ↗

Check that the function i is located at address index

Source from the content-addressed store, hash-verified

716
717// Check that the function i is located at address index
718bool Patch_VerifyLocation(PatchSymbol * ps, u32 index)
719{
720 // We may have already located this symbol.
721 if (ps->Found)
722 {
723 // The location must match!
724 return (ps->Location == (index<<2));
725 }
726
727 // Fail if index is outside of indexable memory
728 if (index > gRamSize>>2)
729 return false;
730
731
732 for (u32 s = 0; s < ps->Signatures[s].NumOps; s++)
733 {
734 if (Patch_VerifyLocation_CheckSignature(ps, &ps->Signatures[s], index))
735 {
736 return true;
737 }
738 }
739
740 // Not found!
741 return false;
742}
743
744
745bool Patch_VerifyLocation_CheckSignature(PatchSymbol * ps,

Callers 1

Tested by

no test coverage detected