Check that the function i is located at address index
| 716 | |
| 717 | // Check that the function i is located at address index |
| 718 | bool 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 | |
| 745 | bool Patch_VerifyLocation_CheckSignature(PatchSymbol * ps, |
no test coverage detected