From 92f9121c49de9f91d9d743b5dc854cf701713dc5 Mon Sep 17 00:00:00 2001
From: John Darrington <john@darrington.wattle.id.au>
Date: Tue, 31 Mar 2009 13:07:03 +0800
Subject: [PATCH] Fixed bug writing portable files.

Don't append slash to sysmis values when writing portable
files.  Fixes bug #26034
---
 src/data/por-file-writer.c     | 3 ++-
 tests/command/import-export.sh | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/data/por-file-writer.c b/src/data/por-file-writer.c
index 8a27f6b785..a50563ab96 100644
--- a/src/data/por-file-writer.c
+++ b/src/data/por-file-writer.c
@@ -215,7 +215,8 @@ write_float (struct pfm_writer *w, double d)
   char buffer[64];
   format_trig_double (d, floor (d) == d ? DBL_DIG : w->digits, buffer);
   buf_write (w, buffer, strlen (buffer));
-  buf_write (w, "/", 1);
+  if (d != SYSMIS)
+    buf_write (w, "/", 1);
 }
 
 /* Write N to the portable file as an integer field. */
diff --git a/tests/command/import-export.sh b/tests/command/import-export.sh
index f0c2b5c479..0cb178bf57 100755
--- a/tests/command/import-export.sh
+++ b/tests/command/import-export.sh
@@ -61,7 +61,7 @@ cat > $TESTFILE <<EOF
 DATA LIST LIST NOTABLE /X Y.
 BEGIN DATA.
 1 2
-3 4
+3 .
 5 6
 END DATA.
 
@@ -83,7 +83,7 @@ diff -b  $TEMPDIR/pspp.list - << EOF
        X        Y
 -------- --------
     1.00     2.00 
-    3.00     4.00 
+    3.00     .
     5.00     6.00 
 EOF
 if [ $? -ne 0 ] ; then fail ; fi
-- 
2.30.2