From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o598VINs023035 for ; Wed, 9 Jun 2010 04:31:19 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o598VILS019352; Wed, 9 Jun 2010 04:31:18 -0400 (EDT) Date: Wed, 9 Jun 2010 04:31:18 -0400 (EDT) Message-Id: <201006090831.o598VILS019352@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Forgot to increment into the nil terminator. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Forgot to increment into the nil terminator. And call va_end() while we're at it. Modified Files: -------------- mdocml: term_ps.c Revision Data ------------- Index: term_ps.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term_ps.c,v retrieving revision 1.4 retrieving revision 1.5 diff -Lterm_ps.c -Lterm_ps.c -u -p -r1.4 -r1.5 --- term_ps.c +++ term_ps.c @@ -125,6 +125,8 @@ ps_printf(struct termp *p, const char *f 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); } @@ -143,7 +145,7 @@ ps_putchar(struct termp *p, char c) 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'; } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv