mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-25 02:03:02 -03:00
修复bug
This commit is contained in:
parent
a491d4de1d
commit
ed59b173d2
1 changed files with 5 additions and 0 deletions
|
@ -560,6 +560,7 @@ namespace Il2CppDumper
|
|||
if (typeDef.field_count > 0)
|
||||
{
|
||||
var fieldEnd = typeDef.fieldStart + typeDef.field_count;
|
||||
var cache = new HashSet<string>(StringComparer.Ordinal);
|
||||
for (var i = typeDef.fieldStart; i < fieldEnd; ++i)
|
||||
{
|
||||
var fieldDef = metadata.fieldDefs[i];
|
||||
|
@ -571,6 +572,10 @@ namespace Il2CppDumper
|
|||
var structFieldInfo = new StructFieldInfo();
|
||||
structFieldInfo.FieldTypeName = ParseType(fieldType, context);
|
||||
var fieldName = FixName(metadata.GetStringFromIndex(fieldDef.nameIndex));
|
||||
if (!cache.Add(fieldName))
|
||||
{
|
||||
fieldName = $"_{i - typeDef.fieldStart}_{fieldName}";
|
||||
}
|
||||
structFieldInfo.FieldName = fieldName;
|
||||
structFieldInfo.IsValueType = IsValueType(fieldType, context);
|
||||
structFieldInfo.IsCustomType = IsCustomType(fieldType, context);
|
||||
|
|
Loading…
Add table
Reference in a new issue