Minor fixes

This commit is contained in:
Jérôme Leclercq
2021-05-29 21:59:51 +02:00
parent 7ced0e5f08
commit 2cd09833a4
3 changed files with 10 additions and 9 deletions

View File

@@ -382,8 +382,8 @@ namespace Nz
{
// If we don't have to read, we move forward
UInt64 currentPos = m_impl->GetCursorPos();
m_impl->SetCursorPos(CursorPosition::AtCurrent, size);
if (!m_impl->SetCursorPos(CursorPosition::AtCurrent, size))
return 0;
return static_cast<std::size_t>(m_impl->GetCursorPos() - currentPos);
}