Skip to content

Commit

Permalink
Fix key error in KFA location
Browse files Browse the repository at this point in the history
  • Loading branch information
SamboyCoding authored Jul 10, 2020
1 parent 8a50c56 commit c10c712
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Cpp2IL/KeyFunctionAddresses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,13 @@ private static void TryUseArrayEnumerator(List<(TypeDefinition type, List<CppMet
var potentialRME = callTargets[6];

//Firstly, sanity checks on the three known addresses we have
var shouldBeO_GT = SharedState.MethodsByAddress[shouldPointToObjectGetType];
var shouldBeT_GIP = SharedState.MethodsByAddress[shouldPointToTypeGetIsPointer];
var shouldBeIOE_C = SharedState.MethodsByAddress[shouldPointToIOECtor];
SharedState.MethodsByAddress.TryGetValue(shouldPointToObjectGetType, out var shouldBeO_GT);
SharedState.MethodsByAddress.TryGetValue(shouldPointToTypeGetIsPointer, out var shouldBeT_GIP);
SharedState.MethodsByAddress.TryGetValue(shouldPointToIOECtor, out var shouldBeIOE_C);

// var shouldBeO_GT = SharedState.MethodsByAddress[shouldPointToObjectGetType];
// var shouldBeT_GIP = SharedState.MethodsByAddress[shouldPointToTypeGetIsPointer];
// var shouldBeIOE_C = SharedState.MethodsByAddress[shouldPointToIOECtor];

if (shouldBeO_GT?.Name == "GetType" && shouldBeT_GIP?.Name == "get_IsPointer" && shouldBeIOE_C?.Name == ".ctor")
{
Expand All @@ -368,4 +372,4 @@ private static void TryUseArrayEnumerator(List<(TypeDefinition type, List<CppMet
Console.WriteLine("\t\t\t\tType not present, not using.");
}
}
}
}

0 comments on commit c10c712

Please sign in to comment.