From 04a06781f53e537780c700551c9c9764d7c81054 Mon Sep 17 00:00:00 2001 From: Raphael Zulliger Date: Wed, 13 May 2015 16:25:56 +0200 Subject: [PATCH] Fixed endianness Vector's begin() and end() --- include/flatbuffers/flatbuffers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index f77b13eed..73a0b1ad1 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -286,8 +286,8 @@ public: iterator begin() { return iterator(Data(), 0); } const_iterator begin() const { return const_iterator(Data(), 0); } - iterator end() { return iterator(Data(), length_); } - const_iterator end() const { return const_iterator(Data(), length_); } + iterator end() { return iterator(Data(), EndianScalar(length_)); } + const_iterator end() const { return const_iterator(Data(), EndianScalar(length_)); } // Change elements if you have a non-const pointer to this object. void Mutate(uoffset_t i, T val) {