diff --git a/compiler2/XerAttributes.cc b/compiler2/XerAttributes.cc index ce62386428d390ac8d5cd26aaade935800f26da4..4e551f379e2c905e5aac71168bf5147cd84af5a4 100644 --- a/compiler2/XerAttributes.cc +++ b/compiler2/XerAttributes.cc @@ -287,8 +287,10 @@ other.print("other"); element_ |= other.element_; embedValues_ |= other.embedValues_; form_ = other.form_; - has_fractionDigits_ = other.has_fractionDigits_; - fractionDigits_ = other.fractionDigits_; + if (other.has_fractionDigits_) { + has_fractionDigits_ = other.has_fractionDigits_; + fractionDigits_ = other.fractionDigits_; + } hex_ |= other.hex_; list_ |= other.list_; if (other.name_.kw_ != NamespaceSpecification::NO_MANGLING) {