diff --git a/src/knx/data_property.cpp b/src/knx/data_property.cpp index 1bf0223..8cd9237 100644 --- a/src/knx/data_property.cpp +++ b/src/knx/data_property.cpp @@ -5,15 +5,16 @@ uint8_t DataProperty::read(uint16_t start, uint8_t count, uint8_t* data) const { - if (count == 0 || _currentElements == 0 || start > _currentElements || count > _currentElements - start + 1) - return 0; - if (start == 0) { pushWord(_currentElements, data); return 1; } + if (count == 0 || _currentElements == 0 || start > _currentElements || count > _currentElements - start + 1) + return 0; + + // we start counting with zero start -= 1;