Usualy it's the local storage with the wrong signedness. Things like the guild id which use abnormaly large storage types, use 0xFF 0xFFFF, thier max value, eg -1. So instead of using 0xFFFF in the code using -1 means you don't have to come back and change it if it changes to say 8bit 0xFF, the 0xFFFF would overflow, or if it goes up in size to 32bit you wind up with 0x0000FFFF which isn't 0xFFFF and then the code is broken but doesn't overflow. So long as the checks are consistant and there aren't any "0" checks..
|