From 91ca273296fe30ccc662271b239a0072e928749e Mon Sep 17 00:00:00 2001 From: Lev Walkin Date: Fri, 11 Aug 2017 02:32:42 -0700 Subject: [PATCH] fix eager cleanup --- skeletons/constr_CHOICE.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skeletons/constr_CHOICE.c b/skeletons/constr_CHOICE.c index 71936c96..86b3601c 100644 --- a/skeletons/constr_CHOICE.c +++ b/skeletons/constr_CHOICE.c @@ -1221,7 +1221,7 @@ CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, if(present == old_present) return 0; - if(old_present == 0) { + if(old_present != 0) { assert(old_present <= td->elements_count); ASN_STRUCT_FREE_CONTENTS_ONLY(*td, sptr); memset(sptr, 0, specs->struct_size);