/* Function for checking if the field fits into the data area specified in the Capability Container.  */
static bool type_2_tag_is_field_within_data_range(type_2_tag_t *p_type_2_tag, uint16_t offset, uint16_t field_length)
/* Function for checking if the field fits into the data area specified in the Capability Container.  */
static bool type_2_tag_is_field_within_data_range(type_2_tag_t *p_type_2_tag, uint16_t offset, uint16_t field_length)
{
    if (field_length == 0)
    {
        return false;
    }
    return     ( (offset + field_length - 1) <
                 (p_type_2_tag->cc.data_area_size + T2T_FIRST_DATA_BLOCK_OFFSET) )
            && ( offset >= T2T_FIRST_DATA_BLOCK_OFFSET );
}