Wrap verify file id condition in Check call (#6085)

Run clang-format

Update testcase
This commit is contained in:
Navin Mohan
2020-09-01 00:02:13 +05:30
committed by GitHub
parent 49f4948f06
commit bb25956f09
2 changed files with 3 additions and 3 deletions

View File

@@ -2274,8 +2274,8 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
template<typename T>
bool VerifyBufferFromStart(const char *identifier, size_t start) {
if (identifier && (size_ < 2 * sizeof(flatbuffers::uoffset_t) ||
!BufferHasIdentifier(buf_ + start, identifier))) {
if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) &&
BufferHasIdentifier(buf_ + start, identifier)))) {
return false;
}