char what[128];
snprintf(what,sizeof(what)-1,"`%.*s...'", ob->l,ob->m);
what[sizeof(what)-1]= 0;
+ obc_tryflush(ch);
ch->error(ch,"buffer limit exceeded",what);
}
}
OutBuffer *ob;
ob= mmalloc(sizeof(*ob));
- ob->l= vasprintf(&ob->m, fmt, al); if (ob->l <= 0) diem();
+ ob->l= vasprintf(&ob->m, fmt, al);
+ if (ob->l < 0) diem();
+ if (!ob->l) { free(ob->m); free(ob); return; }
addlink(ch, ob);
}