Skip to content

Commit 41d9a52

Browse files
committed
add support for slightly different name translation versions
1 parent 4d39684 commit 41d9a52

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Il2CppInspector.Common/Next/NameTranslation/NameTranslationParserContext.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ private enum CurrentSection
1414
Fields,
1515
Properties,
1616
Events,
17-
Parameters
17+
Parameters,
18+
Hashes,
1819
}
1920

2021
private CurrentSection _currentSection;
@@ -61,6 +62,11 @@ private void HandleMetadataLine(string line)
6162
case "#Parameters":
6263
_currentSection = CurrentSection.Parameters;
6364
break;
65+
// Used in some variations of the standard name translation map.
66+
// This doesn't seperate data by sections, but is easier to parse overall
67+
case not null when line.StartsWith("#Hashes"):
68+
_currentSection = CurrentSection.Hashes;
69+
break;
6470
default:
6571
Debug.Assert(false);
6672
break;
@@ -91,7 +97,7 @@ private NameTranslationInfo Parse()
9197

9298
string deobfuscatedName;
9399
string? deobfuscatedNamespace;
94-
if (_currentSection != CurrentSection.Classes)
100+
if (_currentSection != CurrentSection.Classes && _currentSection != CurrentSection.Hashes)
95101
{
96102
deobfuscatedNamespace = null;
97103
deobfuscatedName = ParseFullName(deobfuscatedFullName);

0 commit comments

Comments
 (0)