Common: Sign extend w/func not chained casts.

Should be clearer to read and easier to get right.
This commit is contained in:
Unknown W. Brackets committed 2021-01-31 01:25:52 -08:00
1 parent 8205f9b6f2
commit 1b00da2f3a
23 files changed
+92 -60

No files matched your search

+1 -1
View File
@@ -136,7 +136,7 @@ bool ElfReader::LoadRelocations(const Elf32_Rel *rels, int numRelocs)
DEBUG_LOG(LOADER,"Corresponding lo found at %08x", corrLoAddr);
}
if (Memory::IsValidAddress(corrLoAddr)) {
s16 lo = (s32)(s16)(u16)(Memory::ReadUnchecked_U32(corrLoAddr) & 0xFFFF); //signed??
s16 lo = (s16)Memory::ReadUnchecked_U16(corrLoAddr);
cur += lo;
cur += relocateTo;
addrToHiLo(cur, hi, lo);