* mdocml: Forgot to increment into the nil terminator.
@ 2010-06-09 8:31 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-06-09 8:31 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-09 8:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 8:31 mdocml: Forgot to increment into the nil terminator kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).