Merge branch 'master' of https://github.com/google/flatbuffers into grpc2

This commit is contained in:
Wouter van Oortmerssen
2016-07-20 17:41:36 -07:00
36 changed files with 751 additions and 102 deletions

View File

@@ -1362,7 +1362,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
size_t GetComputedSize() const {
uintptr_t size = upper_bound_ - buf_;
// Align the size to uoffset_t
size = (size - 1 + sizeof(uoffset_t)) & -uintptr_t(sizeof(uoffset_t));
size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1);
return (buf_ + size > end_) ? 0 : size;
}
#endif