Skip to content

Commit 63e9e5b

Browse files
committed
Replace magic number with constant and add information about the origin
1 parent 1607ffb commit 63e9e5b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

targets/netcore/nanoFramework.nanoCLR.Host/NativeAssemblyDetails.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ public uint CheckSum
6464
return result;
6565
}
6666

67-
byte[] data = new byte[numAssemblies * /* size per assembly: */ (4 + 4 * 2 + 128 * 1)];
67+
// assembly data size is comming from debugger library: NativeAssemblyDetails.Size
68+
const int assemblyDataSize = 4 + 4 * 2 + 128 * 1;
69+
70+
byte[] data = new byte[numAssemblies * assemblyDataSize];
71+
6872
if (!Interop.nanoCLR.nanoCLR_GetNativeAssemblyInformation(data, data.Length))
6973
{
7074
return null;

0 commit comments

Comments
 (0)