diff --git a/src/bacnet/basic/service/h_rr.c b/src/bacnet/basic/service/h_rr.c index 077edba0..d174315c 100644 --- a/src/bacnet/basic/service/h_rr.c +++ b/src/bacnet/basic/service/h_rr.c @@ -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 */