Skip to content

Commit 17440ec

Browse files
committed
fix #6015
1 parent 5355092 commit 17440ec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shared-module/rainbowio/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ int32_t colorwheel(mp_float_t pos) {
4242
shift2 = 0;
4343
}
4444
int p = (int)(pos * 3);
45+
p = (p<256) ? p : 255;
4546
return (p << shift1) | ((255 - p) << shift2);
4647
}

0 commit comments

Comments
 (0)