commit | ba7af2f780819ff597a792d79712df30af009fff | [log] [tgz] |
---|---|---|
author | Simon Frank <simon.frank@lohmega.com> | Mon Oct 11 11:32:40 2021 +0200 |
committer | Marti Bolivar <marti.bolivar@nordicsemi.no> | Thu Feb 24 13:45:29 2022 -0800 |
tree | 0b6c01e88a400d9171f39a05c19e5af5089c53fa | |
parent | 4680180944a0dc8b178ad7c3f4d86db76e8acf94 [diff] |
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: Simon Frank <simon.frank@lohmega.com>