First, we indexed the colour array without a required offset. Second, the data type was too small and overflowed negative. Detected during a refactor, which this is a part of.
7.3 KiB
7.3 KiB