From 47c721b32e16a8622d709649f9d5de4400014996 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 13 Dec 2012 14:59:42 +0900 Subject: [PATCH] Clear the dstring in test-harness's printf builtin. PR_Sprintf always appends to the result dstring. I'm not sure if this is by design or a bug, so I'll leave it be for now. --- tools/qfcc/test/test-bi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/test/test-bi.c b/tools/qfcc/test/test-bi.c index 5bc730ef2..a820aa9d8 100644 --- a/tools/qfcc/test/test-bi.c +++ b/tools/qfcc/test/test-bi.c @@ -52,6 +52,8 @@ bi_printf (progs_t *pr) if (!dstr) dstr = dstring_new (); + else + dstring_clear (dstr); PR_Sprintf (pr, dstr, "bi_printf", fmt, count, args); if (dstr->str)