mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
Update data_property.cpp
This commit is contained in:
parent
fda8e64425
commit
6cd030203a
@ -18,7 +18,7 @@ uint8_t DataProperty::read(uint16_t start, uint8_t count, uint8_t* data) const
|
||||
start -= 1;
|
||||
|
||||
// data is already big enough to hold the data
|
||||
memcpy(data, _data + start, count * ElementSize());
|
||||
memcpy(data, _data + (start * ElementSize()), count * ElementSize());
|
||||
|
||||
return count;
|
||||
}
|
||||
@ -66,7 +66,7 @@ uint8_t DataProperty::write(uint16_t start, uint8_t count, const uint8_t* data)
|
||||
_currentElements = start + count;
|
||||
}
|
||||
|
||||
memcpy(_data + start, data, count * ElementSize());
|
||||
memcpy(_data + (start * ElementSize()), data, count * ElementSize());
|
||||
|
||||
return count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user