diff options
author | elfmz <fenix1905@tut.by> | 2022-11-04 01:35:53 +0300 |
---|---|---|
committer | elfmz <fenix1905@tut.by> | 2022-11-04 01:35:53 +0300 |
commit | 89eaed71c674aadda536408638e3416bc7f4c053 (patch) | |
tree | 06264965d9be4e7cc155bd65017a53101be7d72a | |
parent | 7a4a5d072a11681c2727db57ad2dffcfae3c8652 (diff) |
minor
-rw-r--r-- | far2l/src/cache.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/far2l/src/cache.cpp b/far2l/src/cache.cpp index a3f33bce..1b049c91 100644 --- a/far2l/src/cache.cpp +++ b/far2l/src/cache.cpp @@ -160,6 +160,11 @@ LPBYTE BufferedFileView::ViewBytesAt(UINT64 Ptr, DWORD &Size) } if (PseudoFile) { + if (Ptr >= BufferBounds.Ptr && Ptr < BufferBounds.End) { + Size = DWORD(BufferBounds.End - Ptr); + return &Buffer[CheckedCast<size_t>(Ptr - BufferBounds.Ptr)]; + } + Size = 0; return nullptr; } |