mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 23:40:57 +00:00
[C#] Fix truncated ArraySegment<byte> if elementSize != 1 (#6462)
* WIP: Fix returned truncated ArraySegment<byte> if elementSize is not byte * Fix * Regenerated test code
This commit is contained in:
@@ -23,7 +23,7 @@ public struct Stat : IFlatbufferObject
|
||||
#if ENABLE_SPAN_T
|
||||
public Span<byte> GetIdBytes() { return __p.__vector_as_span<byte>(4, 1); }
|
||||
#else
|
||||
public ArraySegment<byte>? GetIdBytes() { return __p.__vector_as_arraysegment(4); }
|
||||
public ArraySegment<byte>? GetIdBytes() { return __p.__vector_as_arraysegment(4, 1); }
|
||||
#endif
|
||||
public byte[] GetIdArray() { return __p.__vector_as_array<byte>(4); }
|
||||
public long Val { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
||||
|
||||
Reference in New Issue
Block a user