mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-16 09:12:22 +00:00
fixed packing structs (#6530)
* fixed packing structs in nested buffers * fixed packing structs
This commit is contained in:
@@ -1284,7 +1284,6 @@ constructor(
|
||||
|
||||
|
||||
pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
const pos = (this.pos !== null ? this.pos!.pack(builder) : 0);
|
||||
const name = (this.name !== null ? builder.createString(this.name!) : 0);
|
||||
const inventory = Monster.createInventoryVector(builder, this.inventory);
|
||||
const test = builder.createObjectOffset(this.test);
|
||||
@@ -1314,7 +1313,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset {
|
||||
const scalarKeySortedTables = Monster.createScalarKeySortedTablesVector(builder, builder.createObjectOffsetList(this.scalarKeySortedTables));
|
||||
|
||||
Monster.startMonster(builder);
|
||||
Monster.addPos(builder, pos);
|
||||
Monster.addPos(builder, (this.pos !== null ? this.pos!.pack(builder) : 0));
|
||||
Monster.addMana(builder, this.mana);
|
||||
Monster.addHp(builder, this.hp);
|
||||
Monster.addName(builder, name);
|
||||
|
||||
Reference in New Issue
Block a user