net: lwm2m: fix write_handler sizes for float32/64
Normally, this bug wasn't apparent as the value is type-casted to a float32/64 type. However, once we start persisting these values they need the correct length. Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
parent
910506cfc1
commit
579e586fa1
1 changed files with 2 additions and 2 deletions
|
@ -2238,13 +2238,13 @@ int lwm2m_write_handler(struct lwm2m_engine_obj_inst *obj_inst,
|
|||
case LWM2M_RES_TYPE_FLOAT32:
|
||||
engine_get_float32fix(&msg->in,
|
||||
(float32_value_t *)data_ptr);
|
||||
len = 4;
|
||||
len = sizeof(float32_value_t);
|
||||
break;
|
||||
|
||||
case LWM2M_RES_TYPE_FLOAT64:
|
||||
engine_get_float64fix(&msg->in,
|
||||
(float64_value_t *)data_ptr);
|
||||
len = 8;
|
||||
len = sizeof(float64_value_t);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue