@@ -52,8 +52,7 @@ public static ClassNode Create()
5252
5353 return new ClassNode ( true ) ;
5454 }
55-
56-
55+
5756 /// <summary>
5857 /// Initializes the class' name and vtable node from RTTI information, if it's not set already
5958 /// </summary>
@@ -72,20 +71,17 @@ public void InitFromRTTI(DrawContext context)
7271 {
7372 rttiInfoFromFirstNode = vtableNode . GetAssociatedRemoteRuntimeTypeInformation ( context ) ;
7473 }
75- else
74+ else if ( firstNode is BaseHexCommentNode baseHexCommentNode )
7675 {
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 ) )
7880 {
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 ) ;
8985 }
9086 }
9187
@@ -98,7 +94,6 @@ public void InitFromRTTI(DrawContext context)
9894 this . Name = fragments [ 0 ] ;
9995 }
10096
101-
10297 public override void GetUserInterfaceInfo ( out string name , out Image icon )
10398 {
10499 throw new InvalidOperationException ( $ "The '{ nameof ( ClassNode ) } ' node should not be accessible from the ui.") ;
0 commit comments