From f34cb4d3ef340a58dae88f426543c05c4e09f6dd Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sun, 3 Jul 2016 10:58:31 -0400 Subject: Fix bug where STRING flag was disabled during record reconstruction, and add test case. --- field.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'field.c') diff --git a/field.c b/field.c index 931bafcc..5e5a3511 100644 --- a/field.c +++ b/field.c @@ -216,7 +216,11 @@ rebuild_record() } } else { *n = *r; - n->flags &= ~(MALLOC|STRING); + if (n->flags & MALLOC) { + /* unexpected, since FIELD is on! */ + warning(_("invalid flags combination `%s' detected while rebuilding record; please file a bug report."), flags2str(n->flags)); + n->flags &= ~MALLOC; + } } n->stptr = cops; -- cgit v1.2.3