mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-04 19:27:41 +00:00
Fix missing break statement in SetAnyValueS case.
Causing SetAnyValueS to treat all scalars as integers. Change-Id: Ib467b255e7f32a1478180a91e65def31676399eb
This commit is contained in:
parent
986b52d849
commit
dac63a227e
1 changed files with 3 additions and 1 deletions
|
|
@ -141,7 +141,9 @@ void SetAnyValueF(reflection::BaseType type, uint8_t *data, double val) {
|
|||
void SetAnyValueS(reflection::BaseType type, uint8_t *data, const char *val) {
|
||||
switch (type) {
|
||||
case reflection::Float:
|
||||
case reflection::Double: SetAnyValueF(type, data, strtod(val, nullptr));
|
||||
case reflection::Double:
|
||||
SetAnyValueF(type, data, strtod(val, nullptr));
|
||||
break;
|
||||
// TODO: support strings.
|
||||
default: SetAnyValueI(type, data, StringToInt(val)); break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue