chishm / nitrohax

NitroHax cheat tool for Nintendo DS
GNU General Public License v3.0
45 stars 34 forks source link

Fix compilation with devkitARM r56-3 #14

Closed chishm closed 2 years ago

chishm commented 2 years ago

Latest devkitARM has gcc 11.1, which has an advanced optimiser able to detect out-of-bounds array accesses via pointers. This broke accessing hardware addresses using a u16*, since the compiler thought it was an array of 0 length. Fixed by using vu16* (volatile types) to prevent aggressive optimisation turning for-loop fills/copies into memset/memcpy.

Fixes #13 .