-/* $Id: term_ps.c,v 1.4 2010/06/09 08:07:13 kristaps Exp $ */
+/* $Id: term_ps.c,v 1.5 2010/06/09 08:31:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
pos = (int)p->engine.ps.psmargcur;
vsnprintf(&p->engine.ps.psmarg[pos], PS_BUFSLOP, fmt, ap);
p->engine.ps.psmargcur = strlen(p->engine.ps.psmarg);
+
+ va_end(ap);
}
PS_GROWBUF(p, 2);
pos = (int)p->engine.ps.psmargcur++;
- p->engine.ps.psmarg[pos] = c;
+ p->engine.ps.psmarg[pos++] = c;
p->engine.ps.psmarg[pos] = '\0';
}