While trying to interprete some data I received in a DataGram I stumble on this weird issue:
I am trying to use the following function:
MemoryBlock.UInt64Value(Offset as Integer) As UInt64
The offset is in bytes according to the docs. However, when I try to access the data I quickly get an Out Of Bounds exception. The following code failed on the second assignment:
Dim ob as new MemoryBlock(8)
ob.Uint64Value(0) = 5250
ob.Uint64Value(4) = 5000
If I increase the MemoryBlock to 128 the it works and correctly load the value in the memory block at the correct offset.
Change the offset to a lower value than 4 like ob.Uint64Value(1), ob.Uint64Value(2) and so on fails in the same way.
Feels like a bug, but maybe I am not aware of certain limitations.
using 2019R3.1 running on MacOS Catalina 10.15.4
(In my use case I am actually reading data but used the write to find out what is going on)