aboutsummaryrefslogtreecommitdiffstats
path: root/lcc/src/trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcc/src/trace.c')
-rw-r--r--lcc/src/trace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lcc/src/trace.c b/lcc/src/trace.c
index 06b627d..3b9ba78 100644
--- a/lcc/src/trace.c
+++ b/lcc/src/trace.c
@@ -8,7 +8,7 @@ static Symbol frameno; /* local holding frame number */
/* appendstr - append str to the evolving format string, expanding it if necessary */
static void appendstr(char *str) {
do
- if (fp == fmtend)
+ if (fp == fmtend) {
if (fp) {
char *s = allocate(2*(fmtend - fmt), FUNC);
strncpy(s, fmt, fmtend - fmt);
@@ -19,6 +19,7 @@ static void appendstr(char *str) {
fp = fmt = allocate(80, FUNC);
fmtend = fmt + 80;
}
+ }
while ((*fp++ = *str++) != 0);
fp--;
}