Fix out-of-bounds access

This commit is contained in:
negativeExponent 2022-01-28 14:50:09 +08:00 committed by negativeExponent
parent 20c35f0188
commit 6fb05a6998

View File

@ -573,7 +573,7 @@ INLINE uint8_t rm(uint32_t addr)
***************************************************************/
#define rm16(addr, r) \
r.b.l = rm(addr); \
r.b.h = rm((addr+1));
r.b.h = rm((addr+1) & 0xffff);
/***************************************************************
* Write a byte to given memory location