Update data_property.cpp

This commit is contained in:
thelsing 2020-07-03 00:47:29 +02:00 committed by GitHub
parent fda8e64425
commit 6cd030203a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}