- if (arm[i].tagmode != ODR_NONE)
- {
- if (o->direction == ODR_DECODE && cl < 0)
- {
- if (o->op->stackp > -1 && !odr_constructed_more(o))
- return 0;
- if (ber_dectag(o->bp, &cl, &tg, &cn, odr_max(o)) <= 0)
- return 0;
- }
- else if (o->direction != ODR_DECODE)
- {
- cl = arm[i].zclass;
- tg = arm[i].tag;
- }
- if (tg == arm[i].tag && cl == arm[i].zclass)
- {
- if (arm[i].tagmode == ODR_IMPLICIT)
- {
- odr_implicit_settag(o, cl, tg);
- return (*arm[i].fun)(o, (char **)p, 0, arm[i].name);
- }
- /* explicit */
- if (!odr_constructed_begin(o, p, cl, tg, 0))
- return 0;
- return (*arm[i].fun)(o, (char **)p, 0, arm[i].name) &&
- odr_constructed_end(o);
- }
- }
- else /* no tagging. Have to poll type */
- {
- if ((*arm[i].fun)(o, (char **)p, 1, arm[i].name) && *(char**)p)
- return 1;
- }
+ if (arm[i].tagmode != ODR_NONE)
+ {
+ if (o->direction == ODR_DECODE && cl < 0)
+ {
+ if (o->op->stack_top && !odr_constructed_more(o))
+ return 0;
+ if (ber_dectag(o->bp, &cl, &tg, &cn, odr_max(o)) <= 0)
+ return 0;
+ }
+ else if (o->direction != ODR_DECODE)
+ {
+ cl = arm[i].zclass;
+ tg = arm[i].tag;
+ }
+ if (tg == arm[i].tag && cl == arm[i].zclass)
+ {
+ if (arm[i].tagmode == ODR_IMPLICIT)
+ {
+ odr_implicit_settag(o, cl, tg);
+ return (*arm[i].fun)(o, (char **)p, 0, arm[i].name);
+ }
+ /* explicit */
+ if (!odr_constructed_begin(o, p, cl, tg, 0))
+ return 0;
+ return (*arm[i].fun)(o, (char **)p, 0, arm[i].name) &&
+ odr_constructed_end(o);
+ }
+ }
+ else /* no tagging. Have to poll type */
+ {
+ if ((*arm[i].fun)(o, (char **)p, 1, arm[i].name) && *(char**)p)
+ return 1;
+ }