From 80104c7e65c12e12c0227c2f4f9516151493ecae Mon Sep 17 00:00:00 2001 From: Francisco Date: Sun, 14 Mar 2021 12:08:02 +0000 Subject: [PATCH] adt, bugfix - fix assert when accessing bounded_vector::data() member --- lib/include/srslte/adt/bounded_vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/include/srslte/adt/bounded_vector.h b/lib/include/srslte/adt/bounded_vector.h index 0a0997d12..eba3015a5 100644 --- a/lib/include/srslte/adt/bounded_vector.h +++ b/lib/include/srslte/adt/bounded_vector.h @@ -107,8 +107,8 @@ public: } T& front() { return (*this)[0]; } const T& front() const { return (*this)[0]; } - T* data() { return &front(); } - const T* data() const { return &front(); } + T* data() { return reinterpret_cast(&buffer[0]); } + const T* data() const { return reinterpret_cast(&buffer[0]); } // Iterators iterator begin() { return data(); }