--- multiplexer/descref.c 2001/08/01 08:23:18 1.5 +++ multiplexer/descref.c 2001/08/01 10:27:41 1.6 @@ -58,11 +58,14 @@ int put_descriptor (file_descr *f, int *infolen) { byte t, l; - if ((t = f->data.ptr[index]) >= NUMBER_ELEMD) { + t = f->data.ptr[index]; +#if (NUMBER_DESCR < 0x100) + if (t >= NUMBER_DESCR) { warn (LWAR,"Bad Descriptor Tag",EDES,2,1,t); *infolen = -1; return (index); } +#endif warn (LINF,"Put Descriptor",EDES,2,0,t); list_incr (index,f->data,1); l = f->data.ptr[index]; @@ -96,11 +99,14 @@ byte *put_descriptor_s (byte *d, int *infolen) { byte t, l; - if ((t = *d++) >= NUMBER_ELEMD) { + t = *d++; +#if (NUMBER_DESCR < 0x100) + if (t >= NUMBER_DESCR) { warn (LWAR,"Bad Descriptor Tag",EDES,3,1,t); *infolen = -1; return (d); } +#endif warn (LINF,"Put Descriptor",EDES,3,0,t); l = *d++; if ((*infolen -= (l + 2)) >= 0) { @@ -152,7 +158,7 @@ static void save_mapreference (maprefere s->version = map->version; /* ... = map->programnumber */ memcpy (&s->autodescr->data[0],dscr,size); - i = NUMBER_ELEMD; + i = NUMBER_DESCR; while (--i >= 0) { if (map->elemdnew[i] == NULL) { s->autodescr->refx[i] = NULL;