Skip to content

Commit 0473b3c

Browse files
Fix for ISystem::copy (Read mapped file wasn't using const overload to get the pointer)
1 parent 73a4f31 commit 0473b3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nbl/system/ISystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ bool ISystem::copy(const system::path& from, const system::path& to)
138138
createFile(readFileFut,from,core::bitflag(IFile::ECF_READ)|IFile::ECF_COHERENT);
139139
if (auto readF=readFileFut.acquire())
140140
{
141-
auto& readFptr = *readF;
141+
// the consts here are super important
142+
const core::smart_refctd_ptr<const IFile>& readFptr = *readF;
142143
if (auto pSrc=readFptr->getMappedPointer())
143144
{
144145
IFile::success_t bytesWritten;

0 commit comments

Comments
 (0)