From 8609523ebaf3fa17d458ee1acee6062e779bbc10 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Thu, 13 Aug 2020 03:42:15 +0200 Subject: [PATCH] C++: Allow typedef aliases to be retrieved from CppTypeCollection indexer --- Il2CppInspector.Common/Cpp/CppTypeCollection.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Il2CppInspector.Common/Cpp/CppTypeCollection.cs b/Il2CppInspector.Common/Cpp/CppTypeCollection.cs index e74c898..980077b 100644 --- a/Il2CppInspector.Common/Cpp/CppTypeCollection.cs +++ b/Il2CppInspector.Common/Cpp/CppTypeCollection.cs @@ -25,7 +25,8 @@ namespace Il2CppInspector.Cpp // All of the literal typedef aliases public Dictionary TypedefAliases { get; } = new Dictionary(); - public CppType this[string s] => Types[s]; + public CppType this[string s] => Types.ContainsKey(s)? Types[s] : + TypedefAliases.ContainsKey(s)? TypedefAliases[s].AsAlias(s) : null; public IEnumerator GetEnumerator() => Types.Values.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();