summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-12-28 10:09:48 -0800
committerWouter van Oortmerssen <aardappel@gmail.com>2017-12-28 10:09:48 -0800
commit0c86929e39cdbd7ee64da5e594833df017a40c11 (patch)
treeaf395bdd08775a8c1a06274ed974526794ccf8bb /samples
parentb24f2016a19a66403f3e15b5f480d9aa03a361b0 (diff)
downloadflatbuffers-0c86929e39cdbd7ee64da5e594833df017a40c11.tar.gz
flatbuffers-0c86929e39cdbd7ee64da5e594833df017a40c11.tar.bz2
flatbuffers-0c86929e39cdbd7ee64da5e594833df017a40c11.zip
Added missing nullptr check in vector of union verifiers.
Change-Id: Iec720991e68ad27580537135bfd8eb4159333921 Tested: on Linux.
Diffstat (limited to 'samples')
-rw-r--r--samples/monster_generated.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/samples/monster_generated.h b/samples/monster_generated.h
index 4c31d5e7..baf3fe74 100644
--- a/samples/monster_generated.h
+++ b/samples/monster_generated.h
@@ -548,6 +548,7 @@ inline bool VerifyEquipment(flatbuffers::Verifier &verifier, const void *obj, Eq
}
inline bool VerifyEquipmentVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
+ if (!values || !types) return !values && !types;
if (values->size() != types->size()) return false;
for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
if (!VerifyEquipment(