Skip to content

Commit

Permalink
Fix missing break statement in SetAnyValueS case.
Browse files Browse the repository at this point in the history
Causing SetAnyValueS to treat all scalars as integers.

Change-Id: Ib467b255e7f32a1478180a91e65def31676399eb
  • Loading branch information
jonsimantov authored and Wouter van Oortmerssen committed Aug 5, 2015
1 parent 986b52d commit dac63a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reflection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dac63a2

Please sign in to comment.