Skip to content

Commit 770723e

Browse files
committed
cast fix
1 parent abf6e95 commit 770723e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wled00/FX_fcn.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,9 @@ uint16_t Segment::virtualLength() const {
648648
#ifndef WLED_DISABLE_2D
649649
// maximum length of a mapped 1D segment, used in PS for buffer allocation
650650
uint16_t Segment::maxMappingLength() const {
651-
unsigned vW = virtualWidth();
652-
unsigned vH = virtualHeight();
653-
return max(sqrt32_bw(vH*vH + vW*vW), (unsigned)getPinwheelLength(vW, vH)); // use diagonal
651+
uint32_t vW = virtualWidth();
652+
uint32_t vH = virtualHeight();
653+
return max(sqrt32_bw(vH*vH + vW*vW), (uint32_t)getPinwheelLength(vW, vH)); // use diagonal
654654
}
655655
#endif
656656
// pixel is clipped if it falls outside clipping range

0 commit comments

Comments
 (0)