> It would be more robust to add also > > ctl->nents++; > > to this function. Agreed. I thought that would require making this ugly change -len = width(ctl->ents[ctl->nents]); +len = width(ctl->ents[ctl->nents - 1]); but `len = width(wcs);` is much better! I will send patch v2 that includes patches 1 to 3 with your suggestions added. Lennard