aboutsummaryrefslogtreecommitdiffstats
path: root/mpfr.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpfr.c')
-rw-r--r--mpfr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mpfr.c b/mpfr.c
index c0f1ff0c..8a5e9a69 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -381,12 +381,10 @@ mpg_format_val(const char *format, int index, NODE *s)
}
s->flags = oflags;
s->stlen = r->stlen;
- if ((s->flags & STRCUR) != 0)
+ if ((s->flags & (MALLOC|STRCUR)) == (MALLOC|STRCUR))
efree(s->stptr);
s->stptr = r->stptr;
freenode(r); /* Do not unref(r)! We want to keep s->stptr == r->stpr. */
-
- s->flags |= STRCUR;
free_wstr(s);
return s;
}