> > @@ -94,7 +99,13 @@ static void extend(pa_tagstruct*t, size_t l) { > > if (t->length+l <= t->allocated) > > return; > > > > - t->data = pa_xrealloc(t->data, t->allocated = t->length+l+100); > > + if (t->type == PA_TAGSTRUCT_DYNAMIC) > > + t->data = pa_xrealloc(t->data, t->allocated = t->length+l+100); > > + else if (t->type == PA_TAGSTRUCT_APPENDED) { > > + t->type = PA_TAGSTRUCT_DYNAMIC; > > + t->data = pa_xmalloc(t->allocated = t->length+l+100); > > + memcpy(t->data, t->per_type.appended, t->length); > > + } > > } > > > > void pa_tagstruct_puts(pa_tagstruct*t, const char *s) { > > > > While you are at it, could you please move the (pre-existing) magic > number 100 into a #define? good idea, will do thanks, p. -- Peter Meerwald +43-664-2444418 (mobile)