This is a somewhat unwieldy fix for all the out of bounds (attempted) array addressing at both ends. When `pos` goes out of bounds in either direction, the test is the same because it's an unsigned integer. However, after the change of direction, the trailing LED will still be out of bounds, so we check that every time we call `setCrgbAt()` for `pos2`. It's rather ugly, but it does ensure that we don't call `setCrgbAt()` with an out-of-bounds address.pull/365/head
parent
0cd6634f95
commit
1f2d32ed79
Loading…
Reference in new issue