From 5760ada0ed6006c4334c8975c6376d9c9c6ff349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 11 Oct 2022 15:42:48 +0100 Subject: [PATCH] Fix processing of fields for classes deriving from MarshalByRefObject (#158) --- MetadataProcessor.Shared/nanoSkeletonGenerator.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MetadataProcessor.Shared/nanoSkeletonGenerator.cs b/MetadataProcessor.Shared/nanoSkeletonGenerator.cs index 230f840..6c00e8a 100644 --- a/MetadataProcessor.Shared/nanoSkeletonGenerator.cs +++ b/MetadataProcessor.Shared/nanoSkeletonGenerator.cs @@ -582,12 +582,11 @@ private int GetInstanceFieldsOffset(TypeDefinition c) private int GetNestedFieldsCount(TypeDefinition c) { - ushort tt; - int fieldCount = 0; if (c.BaseType != null && - c.BaseType.FullName != "System.Object") + c.BaseType.FullName != "System.Object" && + c.BaseType.FullName != "System.MarshalByRefObject") { // get parent type fields count fieldCount = GetNestedFieldsCount(c.BaseType.Resolve());