1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

Merge pull request #928 from raven02/patch-6

ELF loader : small bug fix
This commit is contained in:
Raul Tambre 2014-12-26 09:46:49 +02:00
commit 2c3e3b583a

View File

@ -55,7 +55,7 @@ namespace loader
{
m_shdrs.resize(m_ehdr.is_le() ? m_ehdr.data_le.e_shnum : m_ehdr.data_be.e_shnum);
m_stream->Seek(handler::get_stream_offset() + (m_ehdr.is_le() ? m_ehdr.data_le.e_shoff : m_ehdr.data_be.e_shoff));
size_t size = (m_ehdr.is_le() ? m_ehdr.data_le.e_shnum : m_ehdr.data_be.e_shnum) * sizeof(phdr);
size_t size = (m_ehdr.is_le() ? m_ehdr.data_le.e_shnum : m_ehdr.data_be.e_shnum) * sizeof(shdr);
if (m_stream->Read(m_shdrs.data(), size) != size)
return broken_file;
@ -284,4 +284,4 @@ namespace loader
return ok;
}
}
}
}