Remove RefIndx == 0 condition, as BACnet norm allows this case (#539)

This commit is contained in:
bakmaria
2023-11-25 14:30:10 +01:00
committed by GitHub
parent e1efca9d9e
commit 241cd2994f
+1 -7
View File
@@ -76,13 +76,7 @@ static int Encode_RR_payload(uint8_t *apdu, BACNET_READ_RANGE_DATA *pRequest)
/* We try and do some of the more generic error checking here to cut
* down on duplication of effort */
if ((pRequest->RequestType == RR_BY_POSITION) &&
(pRequest->Range.RefIndex ==
0)) { /* First index is 1 so can't accept 0 */
pRequest->error_code =
ERROR_CODE_OTHER; /* I couldn't see anything more appropriate
so... */
} else if (((PropInfo.RequestTypes & RR_ARRAY_OF_LISTS) == 0) &&
if (((PropInfo.RequestTypes & RR_ARRAY_OF_LISTS) == 0) &&
(pRequest->array_index != 0) &&
(pRequest->array_index != BACNET_ARRAY_ALL)) {
/* Array access attempted on a non array property */