Change datatype in e131 addressable light (#5127)

This commit is contained in:
Jimmy Hedman 2023-07-20 05:54:25 +02:00 committed by GitHub
parent 5eb12ac5fe
commit 76c0d0912f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ bool E131AddressableLightEffect::process_(int universe, const E131Packet &packet
if (universe < first_universe_ || universe > get_last_universe())
return false;
int output_offset = (universe - first_universe_) * get_lights_per_universe();
int32_t output_offset = (universe - first_universe_) * get_lights_per_universe();
// limit amount of lights per universe and received
int output_end =
std::min(it->size(), std::min(output_offset + get_lights_per_universe(), output_offset + packet.count - 1));