alloc/foreign: correctly rebase 'offset'
This commit is contained in:
parent
a40b1254c1
commit
950ac2229f
@ -70,7 +70,9 @@ namespace util::alloc::raw::aligned {
|
||||
|
||||
auto offset (const void *ptr) const
|
||||
{
|
||||
return m_successor.offset (ptr);
|
||||
return m_successor.offset (
|
||||
reinterpret_cast<const std::byte*> (ptr) + m_offset
|
||||
);
|
||||
}
|
||||
|
||||
auto data (void) { return m_successor.data () - m_offset; }
|
||||
|
Loading…
Reference in New Issue
Block a user