aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2007-06-23 20:05:49 +0000
committerLev Walkin <vlm@lionet.info>2007-06-23 20:05:49 +0000
commit33af5c3ef156f62fb186360518fb1e20747de670 (patch)
tree57fecb78cc833bf885ddbd32b22a4fc7af96c795 /libasn1compiler
parenta2f7f112c081d2c7c647e421e315d96f59074400 (diff)
extensibility fix
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_C.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c
index 48948390..d8aa01fb 100644
--- a/libasn1compiler/asn1c_C.c
+++ b/libasn1compiler/asn1c_C.c
@@ -309,8 +309,8 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
asn1p_expr_t *expr = arg->expr;
asn1p_expr_t *v;
int elements; /* Number of elements */
- int ext_start = -1;
- int ext_stop = -1;
+ int ext_start = -2;
+ int ext_stop = -2;
tag2el_t *tag2el = NULL;
int tag2el_count = 0;
int tags_count;
@@ -446,9 +446,9 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
OUT("0, 0, 0,\t/* Optional elements (not needed) */\n");
}
OUT("%d,\t/* Start extensions */\n",
- ext_start);
+ ext_start<0 ? -1 : ext_start);
OUT("%d\t/* Stop extensions */\n",
- (ext_stop<ext_start)?elements+1:ext_stop, ext_stop);
+ (ext_stop<ext_start)?elements+1:(ext_stop<0?-1:ext_stop));
INDENT(-1);
OUT("};\n");