Skip to content
Commit 098f1c9b authored by Michael Scott's avatar Michael Scott Committed by Ioannis Glaropoulos
Browse files

net: lwm2m: tlv: fix float32/64 sign handling

When val1 is 0, we need to handle a negative val2 value so that we
generate correct TLV value.

Example: val1 = 0, val2 = -500000 is equivalent to -0.5 decimal.
Currently we generate: 0.5 (losing the sign).

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/16154



Signed-off-by: default avatarMichael Scott <mike@foundries.io>
parent d52b5843
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment