summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/idl_gen_csharp.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/idl_gen_csharp.cpp b/src/idl_gen_csharp.cpp
index a5423a23..fed1169f 100644
--- a/src/idl_gen_csharp.cpp
+++ b/src/idl_gen_csharp.cpp
@@ -845,6 +845,8 @@ class CSharpGenerator : public BaseGenerator {
code += "Bytes() { return ";
code += "__p.__vector_as_arraysegment(";
code += NumToString(field.value.offset);
+ code +=
+ ", " + NumToString(SizeOf(field.value.type.VectorType().base_type));
code += "); }\n";
code += "#endif\n";