mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 05:13:04 +00:00
[C#] Fix union verifier (#8593)
* [C#] Add test verifying unions * [C#] Fix verifying unions --------- Co-authored-by: Björn Harrtell <bjornharrtell@users.noreply.github.com> Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
committed by
GitHub
parent
deb3d93454
commit
35230bd70c
@@ -684,10 +684,10 @@ namespace Google.FlatBuffers
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Check union data
|
||||
offset = GetVOffset(tablePos, valueVOffset);
|
||||
// Take type id
|
||||
var typeId = verifier_buffer.Get(Convert.ToInt32(offset));
|
||||
// Check union data
|
||||
offset = GetVOffset(tablePos, valueVOffset);
|
||||
if (offset == 0)
|
||||
{
|
||||
// When value data is not present, allow union verification function to deal with illegal offset
|
||||
|
||||
Reference in New Issue
Block a user