Skip to content
Commit ba7af2f7 authored by Simon Frank's avatar Simon Frank Committed by Marti Bolivar
Browse files

include: sensor: sensor_value from double overflow



sensor_value_from_double had a early overflow when converting the
fractional part (val2).  This occured when input was more then
2147.493647 (inp >= INT32_MAX/1000000.0 + 0.01).

return value -ERANGE as this is what errno is set to by `strtod` and
similar posix functions.

fixes issue #39176

Signed-off-by: default avatarSimon Frank <simon.frank@lohmega.com>
parent 46801809
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment