mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-12 07:50:59 +00:00
Fixed incorrect verifier code for nested tables.
It was outputting the type instead of the field name, and didn't deal with NULL fields. Added test case. Also fixed token enums having the wrong value, resulting in unreadable error messages. Change-Id: Icd9b4d22f417bfad5824c0f58e067ce3f2e2dc6f Tested: on Windows and Linux.
This commit is contained in:
@@ -582,6 +582,11 @@ class Verifier {
|
||||
return Verify(elem, sizeof(T));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of a table type.
|
||||
template<typename T> bool VerifyTable(const T *table) const {
|
||||
return !table || table->Verify(*this);
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of any vector type.
|
||||
template<typename T> bool Verify(const Vector<T> *vec) const {
|
||||
const uint8_t *end;
|
||||
|
||||
Reference in New Issue
Block a user