Revert "Fixed a use after free error when manipulating datasets."
[pspp] / src / data / por-file-writer.c
index f5507522b7a81adf0684c13b0f242f58be0e37f0..672add4101cff3520bcd008ea0395a3805a41183 100644 (file)
@@ -316,7 +316,7 @@ write_value (struct pfm_writer *w, const union value *v, int width)
     {
       width = MIN (width, MAX_POR_WIDTH);
       write_int (w, width);
-      buf_write (w, value_str (v, width), width);
+      buf_write (w, v->s, width);
     }
 }
 
@@ -812,7 +812,7 @@ format_trig_double (long double value, int base_10_precision, char output[])
       value -= chunk;
 
       /* Append the chunk, in base 30, to trigs[]. */
-      for (trigs_left = CHUNK_SIZE; chunk > 0 && trigs_left > 0; )
+      for (trigs_left = CHUNK_SIZE; chunk > 0 && trigs_left > 0;)
         {
           trigs[trig_cnt + --trigs_left] = chunk % 30;
           chunk /= 30;