diff options
| author | Dan Engelbrecht <[email protected]> | 2025-03-18 19:33:28 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2025-03-18 19:33:28 +0100 |
| commit | 9debdcada68980e73b3d76681be3cef0cc937edd (patch) | |
| tree | c9bc6d0ca3cd3c3c5d0b943e00e2312e742c90a6 /src/zencore/basicfile.cpp | |
| parent | Merge remote-tracking branch 'origin/main' into sb/build-cache (diff) | |
| parent | improved reporting on async error (#312) (diff) | |
| download | zen-sb/build-cache.tar.xz zen-sb/build-cache.zip | |
Merge remote-tracking branch 'origin/main' into sb/build-cachesb/build-cache
Diffstat (limited to 'src/zencore/basicfile.cpp')
| -rw-r--r-- | src/zencore/basicfile.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/zencore/basicfile.cpp b/src/zencore/basicfile.cpp index 95876cff4..a181bbd66 100644 --- a/src/zencore/basicfile.cpp +++ b/src/zencore/basicfile.cpp @@ -796,6 +796,12 @@ BasicFileWriter::Write(const void* Data, uint64_t Size, uint64_t FileOffset) { if (m_Buffer == nullptr || (Size >= m_BufferSize)) { + if (FileOffset == m_BufferEnd) + { + Flush(); + m_BufferStart = m_BufferEnd = FileOffset + Size; + } + m_Base.Write(Data, Size, FileOffset); return; } |