sys-file-reader: Tolerate duplicate document records.
[pspp] / src / data / mdd-writer.c
index ba69c99cc281a37c23f5116d86f3a0acedcda8a7..3db5f2bd3f22eb3168e4f6e1d7af7b570f7ed01c 100644 (file)
@@ -288,7 +288,7 @@ write_value_label_value (xmlTextWriter *writer, const struct val_lab *vl,
   const union value *value = val_lab_get_value (vl);
   if (width)
     {
-      char *s = xmemdup0 (value_str (value, width), width);
+      char *s = xmemdup0 (value->s, width);
       xmlTextWriterWriteAttribute (writer, _xml ("value"), _xml (s));
       free (s);
     }
@@ -470,7 +470,8 @@ mdd_write (struct file_handle *fh, struct dictionary *dict,
   w->writer = xmlNewTextWriter (xmlOutputBufferCreateFile (w->file, NULL));
   if (!w->writer)
     {
-      msg (ME, _("Internal error creating xmlTextWriter."));
+      msg (ME, _("Internal error creating xmlTextWriter.  "
+                "Please report this to %s."), PACKAGE_BUGREPORT);
       goto error;
     }