Loading
Resolved Issue #309 by Detecting Overflows & Underflows in Set Instructions to p->itemAmount and p->backupItemAmount
Resolved issue #309 (closed) by filtering all set instructions to p->itemamount and p->backupitemamount through some new setters in k_kart.h. The setters take in a data type that can hold as many further and prior values as reasonably possible beyond and before the range UINT8 can hold to prevent overflow and underflow respectively. The only two places the fix doesn't apply are cheats and Lua. The former writes memory directly on a lower level(?) and the latter has no concept of frontend structs which seems like an intentional design decision I don't want to go against.
Edited by SpringEThing