-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
because c# has padding mechanisms for types, its possible for reading a value using precise byte positions wont actually give the correct value.
for example:
public struct Another
{
public byte a;
public float b;
public Vector4 c;
public uint d;
}the field b wont be 1 byte away from start, but 4 bytes away. this is solved by forcing the struct to not be packed, or have an explicit layout. this workaround is only needed for tracing where a field would be at runtime, and so to avoid overriding layouts, storing the padding would be needed.
Metadata
Metadata
Assignees
Labels
No labels