Skip to content

Commit

Permalink
Fix GetGenericArguments for more than 1 generic type when retrieving …
Browse files Browse the repository at this point in the history
…it out of the name.
  • Loading branch information
Orden4 committed Mar 6, 2021
1 parent 94210ca commit b4f509b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CSharp.lua/CoreSystem.Lua/CoreSystem/Reflection/Assembly.lua
Original file line number Diff line number Diff line change
Expand Up @@ -893,15 +893,16 @@ function Type.GetGenericArguments(this)
local name = cls.__name__
local i = name:find("%[")
if i then
i = i + 1
while true do
i = i + 1
local j = name:find(",", i) or -1
local clsName = name:sub(i, j - 1)
t[count] = typeof(System.getClass(clsName))
count = count + 1
if j == -1 then
break
end
count = count + 1
i = j + 1
end
end
return arrayFromTable(t, Type)
Expand Down

0 comments on commit b4f509b

Please sign in to comment.