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:
Wouter van Oortmerssen
2014-07-08 17:14:02 -07:00
parent 7fcbe723fc
commit b3ee52c0a7
2 changed files with 2 additions and 2 deletions

View File

@@ -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";
}
}