Index: trunk/Ohana/src/opihi/lib.data/SplineOps.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/SplineOps.c	(revision 41340)
+++ trunk/Ohana/src/opihi/lib.data/SplineOps.c	(revision 41341)
@@ -41,7 +41,9 @@
     ALLOCATE (spline[0].y2, opihi_flt, spline[0].Nknots);
   }
-  memset (spline[0].xk, 0, spline[0].Nknots * sizeof(opihi_flt));
-  memset (spline[0].yk, 0, spline[0].Nknots * sizeof(opihi_flt));
-  memset (spline[0].y2, 0, spline[0].Nknots * sizeof(opihi_flt));
+  if (spline[0].Nknots) {
+    memset (spline[0].xk, 0, spline[0].Nknots * sizeof(opihi_flt));
+    memset (spline[0].yk, 0, spline[0].Nknots * sizeof(opihi_flt));
+    memset (spline[0].y2, 0, spline[0].Nknots * sizeof(opihi_flt));
+  }
 }
 
@@ -179,7 +181,7 @@
 
   // NOTE: if we want to compress the output table, use native byte order here (last element)
-  gfits_set_bintable_column_reformat (&theader, &ftable, "X_KNOT", "double", myspline->xk, myspline->Nknots, FALSE);
-  gfits_set_bintable_column_reformat (&theader, &ftable, "Y_KNOT", "double", myspline->yk, myspline->Nknots, FALSE);
-  gfits_set_bintable_column_reformat (&theader, &ftable, "DY2_DX", "double", myspline->y2, myspline->Nknots, FALSE);
+  gfits_set_bintable_column_reformat (&theader, &ftable, "X_KNOT", "double", myspline->xk, myspline->Nknots, 0, FALSE);
+  gfits_set_bintable_column_reformat (&theader, &ftable, "Y_KNOT", "double", myspline->yk, myspline->Nknots, 0, FALSE);
+  gfits_set_bintable_column_reformat (&theader, &ftable, "DY2_DX", "double", myspline->y2, myspline->Nknots, 0, FALSE);
 
   if (!append) {
