New function fmt_dollar_template based on pspp-dev discussion.
[pspp] / src / ui / flexifile.c
index 5d06f87621376c615ce15c42f38fd2723eadb528..3d781468bb1d20a773ba7f4ce1dc519e77a3172b 100644 (file)
@@ -22,6 +22,7 @@
 #include <xalloc.h>
 #include <assert.h>
 #include "flexifile.h"
+#include <string.h>
 #include <data/casefile.h>
 #include <data/casefile-private.h>
 #include <data/case.h>
@@ -330,7 +331,7 @@ impl_resize (struct flexifile *ff, int n_values, int posn)
 
       case_copy (&c, 0, &ff->cases[i], 0, posn);
       if ( n_values > 0 ) 
-       memset (case_data_rw(&c, posn), ' ', n_values * MAX_SHORT_STRING) ;
+       memset (case_data_rw_idx(&c, posn), ' ', n_values * MAX_SHORT_STRING) ;
       case_copy (&c, posn + n_values, 
                 &ff->cases[i], posn, ff->value_cnt - posn);