Merge pull request #3954 from yakiro/master

fixed ArrayOutOfBoundsException in java example
This commit is contained in:
Wouter van Oortmerssen 2016-07-20 10:01:32 -07:00 committed by GitHub
commit ffc0d6209a
1 changed files with 2 additions and 2 deletions

View File

@ -727,8 +727,8 @@ offsets.
// Place the two weapons into an array, and pass it to the `createWeaponsVector()` method to
// create a FlatBuffer vector.
int[] weaps = new int[2];
weaps[1] = sword;
weaps[2] = axe;
weaps[0] = sword;
weaps[1] = axe;
// Pass the `weaps` array into the `createWeaponsVector()` method to create a FlatBuffer vector.
int weapons = Monster.createWeaponsVector(builder, weaps);