From: Jon Simantov Date: Wed, 5 Aug 2015 22:45:02 +0000 (-0700) Subject: Fix missing break statement in SetAnyValueS case. X-Git-Tag: v1.2.0~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dac63a227e4155bb2f4b6d7539bc342c3fabbc25;p=platform%2Fupstream%2Fflatbuffers.git Fix missing break statement in SetAnyValueS case. Causing SetAnyValueS to treat all scalars as integers. Change-Id: Ib467b255e7f32a1478180a91e65def31676399eb --- diff --git a/src/reflection.cpp b/src/reflection.cpp index b0a80e4..35ae16f 100644 --- a/src/reflection.cpp +++ b/src/reflection.cpp @@ -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; }