diff options
author | rsc <devnull@localhost> | 2004-08-22 15:39:56 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-08-22 15:39:56 +0000 |
commit | 984e353160593b20d1e2944e1f2e9ce2117c8490 (patch) | |
tree | d7347f9d2ffa06d1033fb41712257a2001fd4d57 /src/lib9/fmt/fmtprint.c | |
parent | c8c0df440f1a22effd43023368c801e1351e31ed (diff) | |
download | plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.tar.gz plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.tar.bz2 plan9port-984e353160593b20d1e2944e1f2e9ce2117c8490.zip |
PowerPC Linux support from ericvh.
Mainly adding va_copy/va_end.
Also fix bug in sprint wrapping
around top of memory.
Diffstat (limited to 'src/lib9/fmt/fmtprint.c')
-rw-r--r-- | src/lib9/fmt/fmtprint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib9/fmt/fmtprint.c b/src/lib9/fmt/fmtprint.c index fe2ad3cc..c682f49f 100644 --- a/src/lib9/fmt/fmtprint.c +++ b/src/lib9/fmt/fmtprint.c @@ -32,14 +32,15 @@ fmtprint(Fmt *f, char *fmt, ...) f->flags = 0; f->width = 0; f->prec = 0; - va = f->args; + va_copy(va, f->args); va_start(f->args, fmt); n = dofmt(f, fmt); va_end(f->args); f->flags = 0; f->width = 0; f->prec = 0; - f->args = va; + va_copy(f->args,va); + va_end(va); if(n >= 0) return 0; return n; |