diff options
author | Won Jeon <won.jeon@arm.com> | 2023-06-07 18:09:40 +0000 |
---|---|---|
committer | Won Jeon <won.jeon@arm.com> | 2023-06-13 17:09:58 +0000 |
commit | e6c001136cbfbb4d1b99d020f7007670c8ddfdab (patch) | |
tree | 10e8f50efa35e2f1920ff18225bbe63c83bb50d4 | |
parent | fb90dd4f9e884715095674001d832321362f3e21 (diff) | |
download | serialization_lib-v0.60.tar.gz |
Add u8 array to float conversion checkv0.60
Signed-off-by: Won Jeon <won.jeon@arm.com>
Change-Id: Idfd668b0ce8f8f587e00ca7b03063ce58d789ac4
-rw-r--r-- | include/attribute.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/attribute.h b/include/attribute.h index 952b030..1a19f62 100644 --- a/include/attribute.h +++ b/include/attribute.h @@ -67,7 +67,7 @@ inline int convertFlatbuffersU8toF32(const flatbuffers::Vector<uint8_t>& in, uin #define DEF_ARGS_VER0_S_float_as_bytes(V) \ { \ std::vector<float> attr_vec; \ - if (convertFlatbuffersU8toF32(*(p->V()), 1, attr_vec)) \ + if (p->V() && convertFlatbuffersU8toF32(*(p->V()), 1, attr_vec)) \ assert(0 && "Failed to convert u8 buffer to f32"); \ _##V = (!attr_vec.empty()) ? attr_vec[0] : 0.0f; \ } |