Tags: Pharap/PokittoArduboy2Prototype
Tags
Fix halting bug in Sprites and SpritesB (#69) The bug was causing the whole processor to freeze. After a long investigation I discovered that the freezing was due to a buffer overrun. The buffer overrun was in turn caused by the difference in size between Pokitto's int and Arduboy's int. The original code was relying on Arduboy's 16 bit int type to overflow without propagating the overflow bit. With the Pokitto's 32 bit int the overflow bit was retained and the result was a number large enough to cause a buffer overrun when indexing Arduboy2's screen buffer.