Skip to content

Commit 6e2bd77

Browse files
authored
bugfix for Ripple effect (1D mode) - solves #130
bounds check on "w" was not working.
1 parent 6c93250 commit 6e2bd77

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
@@ -2561,7 +2561,7 @@ uint16_t ripple_base()
25612561
if ((v >= 0) && (v < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
25622562
SEGMENT.setPixelColor(v, color_blend(SEGMENT.getPixelColor(v), col, mag)); // TODO
25632563
int w = left + propI*2 + 3 -(v-left);
2564-
if ((v >= 0) && (v < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
2564+
if ((w >= 0) && (w < SEGLEN)) // WLEDMM bugfix: v and w can be negative or out-of-range
25652565
SEGMENT.setPixelColor(w, color_blend(SEGMENT.getPixelColor(w), col, mag)); // TODO
25662566
}
25672567
}

0 commit comments

Comments
 (0)