diff options
Diffstat (limited to 'core/fxcrt/cfx_memorystream.cpp')
-rw-r--r-- | core/fxcrt/cfx_memorystream.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_memorystream.cpp b/core/fxcrt/cfx_memorystream.cpp index 345b381226..dcd21f073f 100644 --- a/core/fxcrt/cfx_memorystream.cpp +++ b/core/fxcrt/cfx_memorystream.cpp @@ -148,6 +148,14 @@ bool CFX_MemoryStream::WriteBlock(const void* buffer, return true; } +bool CFX_MemoryStream::Seek(size_t pos) { + if (pos > m_nCurSize) + return false; + + m_nCurPos = pos; + return true; +} + void CFX_MemoryStream::EstimateSize(size_t nInitSize, size_t nGrowSize) { if (m_dwFlags & Type::kConsecutive) { if (m_Blocks.empty()) { |