Output: Minor refactoring of attribute and address output

This commit is contained in:
Katy Coe
2019-11-04 17:34:21 +01:00
parent 6e93d83c8b
commit 9ceb1368e2
3 changed files with 37 additions and 33 deletions

View File

@@ -120,5 +120,9 @@ namespace Il2CppInspector.Reflection
var index = Array.FindIndex(Package.AttributeTypeRanges[imageRange], x => x.token == token);
return index == -1 ? -1 : index + image.customAttributeStart;
}
public static string FormatAddress(ulong address) => address <= 0xffff_ffff
? string.Format($"0x{(uint)address:X8}")
: string.Format($"0x{address:X16}");
}
}