diff options
author | Derek Bailey <derekbailey@google.com> | 2021-02-23 11:30:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-23 11:30:07 -0800 |
commit | 8cccdfba536be9f68004bb53c2ceb06f7510bd58 (patch) | |
tree | 7b9b5772cab1ee003c73ca2c0a23f8c78c8be5cf /net | |
parent | cbbbaa61b34c31f17773c2fef354c31664e9562e (diff) | |
download | flatbuffers-8cccdfba536be9f68004bb53c2ceb06f7510bd58.tar.gz flatbuffers-8cccdfba536be9f68004bb53c2ceb06f7510bd58.tar.bz2 flatbuffers-8cccdfba536be9f68004bb53c2ceb06f7510bd58.zip |
Revert "[C#] Fix truncated ArraySegment<byte> if elementSize != 1 (#6462)" (#6488)
This reverts commit cbbbaa61b34c31f17773c2fef354c31664e9562e.
Diffstat (limited to 'net')
-rw-r--r-- | net/FlatBuffers/Table.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/FlatBuffers/Table.cs b/net/FlatBuffers/Table.cs index fb3b1adc..d888de59 100644 --- a/net/FlatBuffers/Table.cs +++ b/net/FlatBuffers/Table.cs @@ -112,7 +112,7 @@ namespace FlatBuffers // Get the data of a vector whoses offset is stored at "offset" in this object as an // ArraySegment<byte>. If the vector is not present in the ByteBuffer, // then a null value will be returned. - public ArraySegment<byte>? __vector_as_arraysegment(int offset, int elementSize) + public ArraySegment<byte>? __vector_as_arraysegment(int offset) { var o = this.__offset(offset); if (0 == o) @@ -122,7 +122,7 @@ namespace FlatBuffers var pos = this.__vector(o); var len = this.__vector_len(o); - return bb.ToArraySegment(pos, len * elementSize); + return bb.ToArraySegment(pos, len); } #endif |