From ed50211b36683414d348f7b6d9e6f40e9de2902b Mon Sep 17 00:00:00 2001
From: Lev Walkin <vlm@lionet.info>
Date: Mon, 23 Jul 2007 09:57:00 +0000
Subject: [PATCH] natural constraint is only valid in the root of enumeration

---
 skeletons/NativeEnumerated.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/skeletons/NativeEnumerated.c b/skeletons/NativeEnumerated.c
index 12b079e1..b6b47e13 100644
--- a/skeletons/NativeEnumerated.c
+++ b/skeletons/NativeEnumerated.c
@@ -179,7 +179,7 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td,
 	if(ct->flags & APC_EXTENSIBLE) {
 		if(per_put_few_bits(po, inext, 1))
 			_ASN_ENCODE_FAILED;
-		ct = 0;
+		if(inext) ct = 0;
 	} else if(inext) {
 		_ASN_ENCODE_FAILED;
 	}
-- 
GitLab