oops


git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@29 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/skeletons/constr_SEQUENCE.c b/skeletons/constr_SEQUENCE.c
index d9efb86..9aab0d8 100644
--- a/skeletons/constr_SEQUENCE.c
+++ b/skeletons/constr_SEQUENCE.c
@@ -79,11 +79,11 @@
 		ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag);
 
 		if(a_value == b_value) {
-			if(a->el_no < b->el_no)
-				return -1;
+			if(a->el_no > b->el_no)
+				return 1;
 			/*
 			 * Important: we do not check
-			 * for a->el_no being greater than b->el_no!
+			 * for a->el_no <= b->el_no!
 			 */
 			return 0;
 		} else if(a_value < b_value)
@@ -267,8 +267,10 @@
 			asn1_TYPE_tag2member_t key;
 			key.el_tag = tlv_tag;
 			key.el_no = edx;
+			printf("key = %p\n", &key);
 			t2m = bsearch(&key, specs->tag2el, specs->tag2el_count,
 				sizeof(specs->tag2el[0]), _t2e_cmp);
+			printf("t2m = %p\n", t2m);
 			if(t2m) {
 				asn1_TYPE_tag2member_t *best = 0;
 				asn1_TYPE_tag2member_t *t2m_f, *t2m_l;