diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index abd513e7aa..fe99ef6e73 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -230,7 +230,7 @@ void cdvdSaveNVRAM() static void cdvdReadNVM(u8* dst, int offset, int bytes) { int to_read = bytes; - if ((offset + bytes) > sizeof(s_nvram)) [[unlikely]] + if (static_cast(offset + bytes) > sizeof(s_nvram)) [[unlikely]] { WARNING_LOG("CDVD: Out of bounds NVRAM read: offset={}, bytes={}", offset, bytes); to_read = std::max(static_cast(sizeof(s_nvram)) - offset, 0); @@ -245,7 +245,7 @@ static void cdvdReadNVM(u8* dst, int offset, int bytes) static void cdvdWriteNVM(const u8* src, int offset, int bytes) { int to_write = bytes; - if ((offset + bytes) > sizeof(s_nvram)) [[unlikely]] + if (static_cast(offset + bytes) > sizeof(s_nvram)) [[unlikely]] { WARNING_LOG("CDVD: Out of bounds NVRAM write: offset={}, bytes={}", offset, bytes); to_write = std::max(static_cast(sizeof(s_nvram)) - offset, 0);