mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
fix parser string=null (#6810)
Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -812,8 +812,7 @@ CheckedError Parser::ParseField(StructDef &struct_def) {
|
||||
"or in structs.");
|
||||
if (IsString(type) || IsVector(type)) {
|
||||
advanced_features_ |= reflection::DefaultVectorsAndStrings;
|
||||
if (field->value.constant != "0" && field->value.constant != "null" &&
|
||||
!SupportsDefaultVectorsAndStrings()) {
|
||||
if (field->value.constant != "0" && !SupportsDefaultVectorsAndStrings()) {
|
||||
return Error(
|
||||
"Default values for strings and vectors are not supported in one "
|
||||
"of the specified programming languages");
|
||||
|
||||
Reference in New Issue
Block a user