Fixed a bug in DewPoint decoding
This commit is contained in:
parent
be7931c4fb
commit
4a8f72bd1e
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
int64_t tmpDewPoint = 0;
|
int64_t tmpDewPoint = 0;
|
||||||
QCBORDecode_GetInt64InMapSZ(&decodeContext, "DewPoint", &tmpDewPoint);
|
QCBORDecode_GetInt64InMapSZ(&decodeContext, "DewPoint", &tmpDewPoint);
|
||||||
if (tmpDewPoint < 0 || tmpDewPoint > 65535) {
|
if (tmpDewPoint < -32768 || tmpDewPoint > 32767) {
|
||||||
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
|
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
|
||||||
}
|
}
|
||||||
temperature->dewPoint = tmpDewPoint; // NOLINT(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
|
temperature->dewPoint = tmpDewPoint; // NOLINT(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)
|
||||||
|
|
Loading…
Reference in a new issue