From 8b49ba5e599df2f9477755fbc6b3c67e28f6fbbd Mon Sep 17 00:00:00 2001 From: marian Date: Wed, 27 Apr 2016 08:08:08 +0000 Subject: [PATCH] Fixed bug: properly return data pointer when requested offset is not 0. git-svn-id: http://yate.null.ro/svn/yate/trunk@6109 acf43c95-373e-0410-b603-e72c3f656dc1 --- yatemath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yatemath.h b/yatemath.h index 2cd9c21d..2a424263 100644 --- a/yatemath.h +++ b/yatemath.h @@ -523,7 +523,7 @@ public: * @return A pointer to data at requested offset, NULL if there is no data available */ inline Obj* data(unsigned int offs = 0) - { return data(offs,length()); } + { return data(offs,available(offs)); } /** * Get a pointer to data from offset to vector end @@ -531,7 +531,7 @@ public: * @return A pointer to data at requested offset, NULL if there is no data available */ inline const Obj* data(unsigned int offs = 0) const - { return data(offs,length()); } + { return data(offs,available(offs)); } /** * Get a pointer to data from offset to vector end