Commit 7193cf06 authored by Lev Walkin's avatar Lev Walkin

OER encoding of pure NULLs verified

parent 22cef6cb
...@@ -1176,7 +1176,7 @@ CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bp ...@@ -1176,7 +1176,7 @@ CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bp
unsigned apresent = 0; unsigned apresent = 0;
unsigned bpresent = 0; unsigned bpresent = 0;
const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent);
const void *bmember = _get_member_ptr(td, bptr, &belm, &apresent); const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent);
if(amember && bmember) { if(amember && bmember) {
if(apresent == bpresent) { if(apresent == bpresent) {
......
...@@ -357,7 +357,7 @@ CHOICE_encode_oer(asn_TYPE_descriptor_t *td, ...@@ -357,7 +357,7 @@ CHOICE_encode_oer(asn_TYPE_descriptor_t *td,
er = elm->type->op->oer_encoder(elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, er = elm->type->op->oer_encoder(elm->type, elm->encoding_constraints.oer_constraints, memb_ptr,
cb, app_key); cb, app_key);
if(er.encoded > 0) if(er.encoded >= 0)
er.encoded += tag_len; er.encoded += tag_len;
return er; return er;
......
...@@ -38,6 +38,7 @@ TESTS += bundles/11-BMPString-bundle.txt ...@@ -38,6 +38,7 @@ TESTS += bundles/11-BMPString-bundle.txt
TESTS += bundles/12-UniversalString-bundle.txt TESTS += bundles/12-UniversalString-bundle.txt
TESTS += bundles/13-UTCTime-bundle.txt TESTS += bundles/13-UTCTime-bundle.txt
TESTS += bundles/14-GeneralizedTime-bundle.txt TESTS += bundles/14-GeneralizedTime-bundle.txt
TESTS += bundles/15-CHOICE-bundle.txt
EXTRA_DIST = \ EXTRA_DIST = \
random-test-driver.c \ random-test-driver.c \
......
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