mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 20:31:23 +00:00
Fixed vectors reserving wrong amount of space in Java.
In the generated code, the type of the vector was used for the element size, instead of the vector element type. Change-Id: Ie16d5221a61474365292c948fd3af99e2a7716c7 Tested: on Windows.
This commit is contained in:
@@ -335,7 +335,7 @@ static void GenStruct(StructDef &struct_def,
|
||||
code += " public static void start" + MakeCamel(field.name);
|
||||
code += "Vector(FlatBufferBuilder builder, int numElems) ";
|
||||
code += "{ builder.startVector(";
|
||||
code += NumToString(InlineSize(field.value.type));
|
||||
code += NumToString(InlineSize(field.value.type.VectorType()));
|
||||
code += ", numElems); }\n";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user