Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Fix Fire2012 crash on ledcount < 8
Browse files Browse the repository at this point in the history
  • Loading branch information
SciLor committed Nov 21, 2016
1 parent 6eb6eb8 commit c73e048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HyperionRGB/WrapperLedControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void WrapperLedControl::fire2012Step(void) {

// Step 3. Randomly ignite new 'sparks' of _fire2012Heat near the bottom
if( random8() < SPARKING ) {
int y = random8(7);
int y = random8(min(7, _ledCount - 1));
_fire2012Heat[y] = qadd8(_fire2012Heat[y], random8(160,255));
}

Expand Down

0 comments on commit c73e048

Please sign in to comment.