1
0
Fork 0

fix off-by-one in range check

This commit is contained in:
Kevin Matz 2022-12-06 13:24:09 -05:00
parent ca75a9973c
commit 738ced6964
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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