We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49e147b commit b4acac5Copy full SHA for b4acac5
src/linker/Linker/CompilerGeneratedNames.cs
@@ -34,7 +34,7 @@ internal static bool IsLambdaMethod (string methodName)
34
return false;
35
36
// Ignore the method ordinal/generation and lambda ordinal/generation.
37
- return methodName[i + 1] == 'b';
+ return (methodName.Length > i + 1) && methodName[i + 1] == 'b';
38
}
39
40
// Local functions have generated names like "<UserMethod>g__LocalFunction|0_1" where "UserMethod" is the name
@@ -50,7 +50,7 @@ internal static bool IsLocalFunction (string methodName)
50
51
52
// Ignore the method ordinal/generation and local function ordinal/generation.
53
- return methodName[i + 1] == 'g';
+ return (methodName.Length > i + 1) && methodName[i + 1] == 'g';
54
55
56
0 commit comments