mirror of https://github.com/PCSX2/pcsx2.git
Elfheader: Fix Wsign-compare warnings.
This commit is contained in:
parent
0a58783a86
commit
ae772e6a74
|
@ -149,7 +149,7 @@ void ElfObject::initElfHeaders()
|
|||
|
||||
bool ElfObject::hasValidPSXHeader()
|
||||
{
|
||||
if (data.GetSizeInBytes() < sizeof(PSXEXEHeader))
|
||||
if (data.GetSizeInBytes() < static_cast<s64>(sizeof(PSXEXEHeader)))
|
||||
return false;
|
||||
|
||||
const PSXEXEHeader* header = reinterpret_cast<const PSXEXEHeader*>(data.GetPtr());
|
||||
|
@ -158,7 +158,7 @@ bool ElfObject::hasValidPSXHeader()
|
|||
if (std::memcmp(header->id, expected_id, sizeof(expected_id)) != 0)
|
||||
return false;
|
||||
|
||||
if ((header->file_size + sizeof(PSXEXEHeader)) > data.GetSizeInBytes())
|
||||
if (static_cast<s64>(header->file_size + sizeof(PSXEXEHeader)) > data.GetSizeInBytes())
|
||||
{
|
||||
Console.Warning("Incorrect file size in PS-EXE header: %u bytes should not be greater than %u bytes",
|
||||
header->file_size, static_cast<unsigned>(data.GetSizeInBytes() - sizeof(PSXEXEHeader)));
|
||||
|
|
Loading…
Reference in New Issue