mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
TypeScript: read vtable entries as uint16 (#8435)
Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
185e41fac4
commit
84f4b83d3e
@@ -192,8 +192,8 @@ export class ByteBuffer {
|
||||
*/
|
||||
__offset(bb_pos: number, vtable_offset: number): Offset {
|
||||
const vtable = bb_pos - this.readInt32(bb_pos);
|
||||
return vtable_offset < this.readInt16(vtable)
|
||||
? this.readInt16(vtable + vtable_offset)
|
||||
return vtable_offset < this.readUint16(vtable)
|
||||
? this.readUint16(vtable + vtable_offset)
|
||||
: 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user