@@ -52,8 +52,7 @@ public static ClassNode Create()
52
52
53
53
return new ClassNode ( true ) ;
54
54
}
55
-
56
-
55
+
57
56
/// <summary>
58
57
/// Initializes the class' name and vtable node from RTTI information, if it's not set already
59
58
/// </summary>
@@ -72,20 +71,17 @@ public void InitFromRTTI(DrawContext context)
72
71
{
73
72
rttiInfoFromFirstNode = vtableNode . GetAssociatedRemoteRuntimeTypeInformation ( context ) ;
74
73
}
75
- else
74
+ else if ( firstNode is BaseHexCommentNode baseHexCommentNode )
76
75
{
77
- if ( firstNode is BaseHexCommentNode baseHexCommentNode )
76
+ // ask it as if it might point to a vtable
77
+ var value = context . Memory . InterpretData64 ( Offset ) ;
78
+ rttiInfoFromFirstNode = baseHexCommentNode . GetAssociatedRemoteRuntimeTypeInformation ( context , value . IntPtr ) ;
79
+ if ( ! string . IsNullOrEmpty ( rttiInfoFromFirstNode ) )
78
80
{
79
- // ask it as if it might point to a vtable
80
- var value = context . Memory . ReadFromBuffer ( Offset ) ;
81
- rttiInfoFromFirstNode = baseHexCommentNode . GetAssociatedRemoteRuntimeTypeInformation ( context , value . IntPtr ) ;
82
- if ( ! string . IsNullOrEmpty ( rttiInfoFromFirstNode ) )
83
- {
84
- // convert first node to vtable node
85
- var newVTableNode = BaseNode . CreateInstanceFromType ( typeof ( VirtualMethodTableNode ) ) ;
86
- var createdNodes = new List < BaseNode > ( ) ;
87
- this . ReplaceChildNode ( firstNode , newVTableNode , ref createdNodes ) ;
88
- }
81
+ // convert first node to vtable node
82
+ var newVTableNode = BaseNode . CreateInstanceFromType ( typeof ( VirtualMethodTableNode ) ) ;
83
+ var createdNodes = new List < BaseNode > ( ) ;
84
+ this . ReplaceChildNode ( firstNode , newVTableNode , ref createdNodes ) ;
89
85
}
90
86
}
91
87
@@ -98,7 +94,6 @@ public void InitFromRTTI(DrawContext context)
98
94
this . Name = fragments [ 0 ] ;
99
95
}
100
96
101
-
102
97
public override void GetUserInterfaceInfo ( out string name , out Image icon )
103
98
{
104
99
throw new InvalidOperationException ( $ "The '{ nameof ( ClassNode ) } ' node should not be accessible from the ui.") ;
0 commit comments