We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dad893 commit 5d56313Copy full SHA for 5d56313
src/NimBLEAttValue.h
@@ -283,7 +283,10 @@ class NimBLEAttValue {
283
typename std::enable_if<Has_data_size<T>::value, bool>::type
284
# endif
285
setValue(const T& v) {
286
- return setValue(reinterpret_cast<const uint8_t*>(v.data()), v.size());
+ return setValue(
287
+ reinterpret_cast<const uint8_t*>(v.data()),
288
+ v.size() * sizeof(typename T::value_type{}) // Calculate effective size in bytes
289
+ );
290
}
291
292
# else
0 commit comments