From 055f8af19651d6d4d6d613829b62f0ecce11de4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Mon, 23 Jun 2025 17:48:18 +0100 Subject: [PATCH] Fix dump token for typespec - Fix access to correct assembly index. --- src/CLR/Diagnostics/Info.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CLR/Diagnostics/Info.cpp b/src/CLR/Diagnostics/Info.cpp index fe4bd48131..194a6542d3 100644 --- a/src/CLR/Diagnostics/Info.cpp +++ b/src/CLR/Diagnostics/Info.cpp @@ -524,8 +524,14 @@ void CLR_RT_Assembly::DumpToken(CLR_UINT32 token, const CLR_RT_TypeSpec_Index *g // back to BuildTypeName for the full concrete name. // + CLR_UINT32 ownerAsm = assemblyIndex; + if (genericType != nullptr && NANOCLR_INDEX_IS_VALID(*genericType)) + { + ownerAsm = genericType->Assembly(); + } + CLR_RT_TypeSpec_Index tsIdx; - tsIdx.Set(assemblyIndex, index); + tsIdx.Set(ownerAsm, index); // bind to get the signature blob CLR_RT_TypeSpec_Instance tsInst{};