Fixed a bugs in the Java runtime that could cause an index out of bounds exception.

Tested: on Windows.

Change-Id: I0d4cdafc21690eb9a509ba31f21e80dacfb602ff
This commit is contained in:
Wouter van Oortmerssen
2014-07-01 17:56:12 -07:00
parent 1256307a38
commit 350011f581
8 changed files with 32 additions and 29 deletions

View File

@@ -18,9 +18,9 @@ public class Vec3 extends Struct {
public Test test3(Test obj) { return obj.__init(bb_pos + 26, bb); }
public static int createVec3(FlatBufferBuilder builder, float x, float y, float z, double test1, byte test2, short Test_a, byte Test_b) {
builder.prep(16, 0);
builder.prep(16, 32);
builder.pad(2);
builder.prep(2, 0);
builder.prep(2, 4);
builder.pad(1);
builder.putByte(Test_b);
builder.putShort(Test_a);