Skip to content

Commit 1bf13ea

Browse files
DedeHainetmindz
authored andcommitted
BUGFIX in oscillate FX (#4494)
effect was changed from int to uint but it relied on negative numbers. fixed by checking overflow and a cast.
1 parent edc6022 commit 1bf13ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wled00/FX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ uint16_t mode_oscillate(void) {
18091809
uint32_t color = BLACK;
18101810
for (unsigned j = 0; j < numOscillators; j++) {
18111811
if((int)i >= (int)oscillators[j].pos - oscillators[j].size && i <= oscillators[j].pos + oscillators[j].size) {
1812-
color = (color == BLACK) ? SEGCOLOR(j) : color_blend(color, SEGCOLOR(j), 128);
1812+
color = (color == BLACK) ? SEGCOLOR(j) : color_blend(color, SEGCOLOR(j), uint8_t(128));
18131813
}
18141814
}
18151815
SEGMENT.setPixelColor(i, color);

0 commit comments

Comments
 (0)