summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ble/weather/WeatherService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp
index e5d8053a..a30b2270 100644
--- a/src/components/ble/weather/WeatherService.cpp
+++ b/src/components/ble/weather/WeatherService.cpp
@@ -195,7 +195,7 @@ namespace Pinetime {
int64_t tmpTemperature = 0;
QCBORDecode_GetInt64InMapSZ(&decodeContext, "Temperature", &tmpTemperature);
- if (tmpTemperature < 0 || tmpTemperature > 65535) {
+ if (tmpTemperature < -32768 || tmpTemperature > 32767) {
return BLE_ATT_ERR_INVALID_ATTR_VALUE_LEN;
}
temperature->temperature = tmpTemperature; // NOLINT(bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions)