Skip to content

Commit 64bc069

Browse files
authored
Fix faulty failure condition in BinarySearcher
1 parent 2acc70e commit 64bc069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

LibCpp2IL/BinarySearcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ internal ulong FindCodeRegistrationPost2019()
196196
pSomewhereInCodegenModules = pSomewhereInCodegenModules.Select(va => va - ptrSize);
197197
}
198198

199-
if (backtrack == sanityCheckNumberOfModules)
199+
if (backtrack == sanityCheckNumberOfModules && (pCodegenModules?.Count() ?? 0) != 1)
200200
{
201201
LibLogger.WarnNewline($"Hit backtrack limit of {backtrack} modules and still didn't find a valid pCodegenModules pointer.");
202202
return 0;

0 commit comments

Comments
 (0)