summaryrefslogtreecommitdiff
path: root/net/FlatBuffers/Table.cs
diff options
context:
space:
mode:
authorDerek Bailey <derekbailey@google.com>2021-02-23 11:30:07 -0800
committerGitHub <noreply@github.com>2021-02-23 11:30:07 -0800
commit8cccdfba536be9f68004bb53c2ceb06f7510bd58 (patch)
tree7b9b5772cab1ee003c73ca2c0a23f8c78c8be5cf /net/FlatBuffers/Table.cs
parentcbbbaa61b34c31f17773c2fef354c31664e9562e (diff)
downloadflatbuffers-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/FlatBuffers/Table.cs')
-rw-r--r--net/FlatBuffers/Table.cs4
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&lt;byte&gt;. 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