mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C#: Fix completely broken type argument extraction in NoMetadataHandleType
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Semmle.Extraction.CIL.Entities
|
||||
|
||||
// "T3,[T4, Assembly1, Version=...],T5,T6"
|
||||
string typeArgs;
|
||||
(name, _, typeArgs, _) = name.Split(firstBracketIndex, firstBracketIndex + 1, lastBracketIndex - firstBracketIndex - 1);
|
||||
(name, _, typeArgs, _) = name.Split(firstBracketIndex, firstBracketIndex + 1, lastBracketIndex);
|
||||
|
||||
var thisTypeArgCount = GenericsHelper.GetGenericTypeParameterCount(name);
|
||||
if (thisTypeArgCount == 0)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Semmle.Util
|
||||
public static (string, string, string, string) Split(this string self, int index0, int index1, int index2)
|
||||
{
|
||||
var split = self.Split(new[] { index0, index1, index2 });
|
||||
return (split[0], split[1], split[2], split[4]);
|
||||
return (split[0], split[1], split[2], split[3]);
|
||||
}
|
||||
|
||||
private static List<string> Split(this string self, params int[] indices)
|
||||
|
||||
Reference in New Issue
Block a user