Yes, I know what integer overflow means, but do you know how it is implemented in DF? I can get 2 mil gold but not 2.5 mil gold without triggering it, and 4.5 mil exp but not 5 mil exp. So it didn't seem to be an digit overflow, or a binary bit overflow, as 2^16 - 1 is 65K and 2^32 is 4.3 bil. The triggers are happening at around the 22nd bit (which I supposed could be possible but immensely unusual), so I thought it had to be by design.
And I checked, it's calculated by EXP gained, and not effective EXP gained. So getting 100,000 exp when you only need 10 to level up, will put 100,000 exp towards the cap, but only adds 10 to your character.