You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The arguments, p, should be parenthesized. Otherwise, calling pgm_read_word(ptr + i) might result in the wrong address being calculated due to ptr being type cast before addition. Other macros in the codebase might have the same issue.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/progmem.h#L8-L9
The arguments,
p
, should be parenthesized. Otherwise, callingpgm_read_word(ptr + i)
might result in the wrong address being calculated due toptr
being type cast before addition. Other macros in the codebase might have the same issue.Solution: put
p
in parentheses.Discovered in qmk/qmk_firmware#4775.
The text was updated successfully, but these errors were encountered: