fix off-by-one in range check
This commit is contained in:
parent
ca75a9973c
commit
738ced6964
|
@ -250,7 +250,7 @@ void Universe::setValue(const uint16_t start, const uint16_t footprint,
|
|||
const uint8_t* data)
|
||||
{
|
||||
// start and footprint valid?
|
||||
if (start < 1 || start + footprint >= null_start_data.size())
|
||||
if (start < 1 || start + footprint > null_start_data.size())
|
||||
return;
|
||||
|
||||
null_start_mutex.lock();
|
||||
|
|
|
@ -265,7 +265,7 @@ void Universe::setValue (const uint16_t start, const uint16_t footprint,
|
|||
return;
|
||||
|
||||
// start and footprint valid?
|
||||
if (start < 1 || start + footprint >= null_start_data.size())
|
||||
if (start < 1 || start + footprint > null_start_data.size())
|
||||
return;
|
||||
|
||||
// set active_data_slots to at least end of footprint
|
||||
|
|
Loading…
Reference in New Issue