Skip to content

Commit

Permalink
Merge pull request #7 from dmadison/min-patch
Browse files Browse the repository at this point in the history
Fix min function deduction on ESP platforms
  • Loading branch information
dmadison committed Jul 7, 2023
2 parents 3064baf + a30e8fc commit 656f049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FastLED_NeoPixel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void FastLED_NeoPixel_Variant::fill(uint32_t c, uint16_t first, uint16_t count)

if (first == 0 && count == 0) count = numLEDs; // if auto, fill from start to end
else if (first != 0 && count == 0) count = numLEDs - first; // if only first is set, fill from first to end
else count = min(count, numLEDs - first); // if both are set, fill from first to end without overrunning buffer
else count = min(count, static_cast<uint16_t>(numLEDs - first)); // if both are set, fill from first to end without overrunning buffer

fill_solid(leds + first, count, packedToColor(c));
}
Expand Down

0 comments on commit 656f049

Please sign in to comment.