Merge pull request #83 from se-apc/bugfix/fixing_error_condition_for__max_recipients_wp (#852)

Fixing ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY condition

Co-authored-by: Tomasz Kazimierz Motyl <tomasz.motyl@se.com>
This commit is contained in:
Tomasz Kazimierz Motyl
2024-11-13 14:26:46 +00:00
committed by GitHub
parent b97f1705ce
commit ab74620449
+2 -1
View File
@@ -415,7 +415,8 @@ bool Notification_Class_Write_Property(BACNET_WRITE_PROPERTY_DATA *wp_data)
}
iOffset += len;
/* Increasing element of list */
if (++idx >= NC_MAX_RECIPIENTS) {
if ((++idx >= NC_MAX_RECIPIENTS) &&
(iOffset < wp_data->application_data_len)) {
wp_data->error_class = ERROR_CLASS_RESOURCES;
wp_data->error_code = ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY;
return false;