X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fdata%2Fsys-file-reader.c;h=8abfe10b689fda6ce24df8c7d916ee3618a37aa7;hb=62b5101a28fc2c4a9b8b26a998fb6c4ec12d84c7;hp=6010d77313bb81a23f1442c15e6af808690745d3;hpb=7bf210c4fd179a22dd8c6a071f0b23f7ae4e14c2;p=pspp diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index 6010d77313..8abfe10b68 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -2335,7 +2335,14 @@ parse_attributes (struct sfm_reader *r, struct text_record *text, break; } if (attrs != NULL) - attrset_add (attrs, attr); + { + if (!attrset_try_add (attrs, attr)) + { + text_warn (r, text, _("Duplicate attribute %s."), + attribute_get_name (attr)); + attribute_destroy (attr); + } + } else attribute_destroy (attr); }