From 0249f66066e739fac2b4d7433be2cfb54ea1ec26 Mon Sep 17 00:00:00 2001 From: Andreas Doppelhofer Date: Sun, 2 Jun 2024 11:18:35 +0200 Subject: [PATCH] SML: Allow larger offset when using x to ignore bytes (#21535) * Allow larger offset when using x to ignore bytes STW Klagenfurt sends 355 bytes, and the interesting values starts somewhere at position 304. Therefor we need to set a larger uint range to allow more than 255 bytes to ignore. * Update xsns_53_sml.ino --------- Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com> --- tasmota/tasmota_xsns_sensor/xsns_53_sml.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino b/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino index 59998d7fc..af3120d62 100755 --- a/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_53_sml.ino @@ -2033,7 +2033,7 @@ void SML_Decode(uint8_t index) { } else { mp++; if (isdigit(*mp)) { - uint8_t skip = strtol((char*)mp, (char**)&mp, 10); + uint32_t skip = strtol((char*)mp, (char**)&mp, 10); cp += skip; } }