diff options
author | Phlosioneer <mattmdrr2@gmail.com> | 2019-03-02 00:36:59 -0500 |
---|---|---|
committer | Phlosioneer <mattmdrr2@gmail.com> | 2019-03-02 00:36:59 -0500 |
commit | 0f6cc27e81d4985d61e5caa669027801d520a122 (patch) | |
tree | 7568b12f272e66e91807ea5f8a814ce602a990ef /include/script_menu.h | |
parent | 3ceb1667c9b5e81934c7d608efc08905f21c372e (diff) |
Fixed decomp issue around LoadPalette
In LoadLinkPartnerEventObjectSpritePalette, using paletteNum += 6 causes
GCC to "mark" paletteNum's register as a possible overflow, even though
it performs the overflow check. Then, when passing args to LoadPalette,
GCC fails to recognize that 0x100 + ((any u8) << 4) can never overflow
as a u16. It then does an overflow check before calling LoadPalette.
Assigning to a temp variable seems to avoid this "marking" behavior.
Diffstat (limited to 'include/script_menu.h')
0 files changed, 0 insertions, 0 deletions