e131: fix issue 1579: limitation of maximum light count (#1619)

This commit is contained in:
DrZoid 2021-03-19 09:19:34 +01:00 committed by GitHub
parent a77784a6da
commit e5b45b6b4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,8 @@ bool E131AddressableLightEffect::process_(int universe, const E131Packet &packet
int 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(), packet.count - 1));
int output_end =
std::min(it->size(), std::min(output_offset + get_lights_per_universe(), output_offset + packet.count - 1));
auto input_data = packet.values + 1;
ESP_LOGV(TAG, "Applying data for '%s' on %d universe, for %d-%d.", get_name().c_str(), universe, output_offset,