mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 20:15:34 +00:00
Fixed float suffix not being added on implicit float defaults.
Change-Id: I8dcbb5e93836356511d411ef86452babd3dd3c0b Tested: on Linux.
This commit is contained in:
@@ -543,10 +543,10 @@ CheckedError Parser::ParseField(StructDef &struct_def) {
|
||||
if (!IsScalar(type.base_type))
|
||||
return Error("default values currently only supported for scalars");
|
||||
ECHECK(ParseSingleValue(field->value));
|
||||
if (IsFloat(field->value.type.base_type)) {
|
||||
if (!strpbrk(field->value.constant.c_str(), ".eE"))
|
||||
field->value.constant += ".0";
|
||||
}
|
||||
}
|
||||
if (IsFloat(field->value.type.base_type)) {
|
||||
if (!strpbrk(field->value.constant.c_str(), ".eE"))
|
||||
field->value.constant += ".0";
|
||||
}
|
||||
|
||||
if (type.enum_def &&
|
||||
|
||||
Reference in New Issue
Block a user