1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Improve lv2_file::file_view::read

This commit is contained in:
Eladash 2023-10-02 15:02:46 +03:00 committed by Elad Ashkenazi
parent dd518fcafb
commit 257b0f0d69

View File

@ -606,10 +606,7 @@ struct lv2_file::file_view : fs::file_base
u64 read(void* buffer, u64 size) override
{
const u64 old_pos = m_file->file.pos();
m_file->file.seek(m_off + m_pos);
const u64 result = m_file->file.read(buffer, size);
ensure(old_pos == m_file->file.seek(old_pos));
const u64 result = m_file->file.read_at(m_off + m_pos, buffer, size);
m_pos += result;
return result;