Skip to content

Commit

Permalink
Update src/app/clusters/thermostat-server/thermostat-server-presets.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Aug 23, 2024
1 parent 0f1993f commit f0eafac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * dele
uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate);

// We will be adding one more preset, so reject if the length is already at max.
if (numberOfPendingPresets >= numberOfPresetsSupported)
if (numberOfPendingPresets >= delegate->GetNumberOfPresets())
{
return CHIP_IM_GLOBAL_STATUS(ResourceExhausted);
}
Expand Down

0 comments on commit f0eafac

Please sign in to comment.