Skip to content

Commit

Permalink
Check cmpd member types when subsetting
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Apr 10, 2024
1 parent 2e83194 commit 00cfda3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rest_vol_datatype.c
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,8 @@ RV_get_cmpd_subset_type(hid_t src_type_id, hid_t dst_type_id, RV_subset_t *subse
"can't get destination datatype member offset");

/* Compare member names and offsets */
if (!strcmp(src_member_name, dst_member_name) && (src_member_offset == dst_member_offset)) {
if (!strcmp(src_member_name, dst_member_name) && (src_member_offset == dst_member_offset) &&
(H5Tequal(src_member_type, dst_member_type) > 0)) {
member_match = TRUE;
}

Expand Down Expand Up @@ -2728,7 +2729,8 @@ RV_get_cmpd_subset_type(hid_t src_type_id, hid_t dst_type_id, RV_subset_t *subse
"can't get memory datatype member offset");

/* Compare member names and offsets */
if (!strcmp(dst_member_name, src_member_name) && (dst_member_offset == src_member_offset)) {
if (!strcmp(dst_member_name, src_member_name) && (dst_member_offset == src_member_offset) &&
(H5Tequal(dst_member_type, src_member_type) > 0)) {
member_match = TRUE;
}
/* Clean up */
Expand Down

0 comments on commit 00cfda3

Please sign in to comment.