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
This commit is contained in:
marian 2016-04-27 08:08:08 +00:00
parent 4c8b78b1b1
commit 8b49ba5e59
1 changed files with 2 additions and 2 deletions

View File

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