Commit 2ed11835 authored by Lev Walkin's avatar Lev Walkin

comparison and free fixes

parent 349b3407
...@@ -1739,8 +1739,10 @@ OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, ...@@ -1739,8 +1739,10 @@ OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr,
break; break;
case ASFM_FREE_UNDERLYING_AND_RESET: case ASFM_FREE_UNDERLYING_AND_RESET:
memset(sptr, 0, memset(sptr, 0,
((const asn_OCTET_STRING_specifics_t *)(td->specifics)) td->specifics
->struct_size); ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics))
->struct_size
: sizeof(OCTET_STRING_t));
break; break;
} }
} }
...@@ -1828,7 +1830,7 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, ...@@ -1828,7 +1830,7 @@ OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr,
return 0; return 0;
} }
} else { } else {
return ret; return ret < 0 ? -1 : 1;
} }
} else if(!a && !b) { } else if(!a && !b) {
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment