IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 19, 2019, 5:32:31 PM (7 years ago)
Author:
eugene
Message:

do not allow splines with < 3 pts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20190329/src/opihi/lib.data/SplineOps.c

    r38441 r40837  
    4141    ALLOCATE (spline[0].y2, opihi_flt, spline[0].Nknots);
    4242  }
    43   memset (spline[0].xk, 0, spline[0].Nknots * sizeof(opihi_flt));
    44   memset (spline[0].yk, 0, spline[0].Nknots * sizeof(opihi_flt));
    45   memset (spline[0].y2, 0, spline[0].Nknots * sizeof(opihi_flt));
     43  if (spline[0].Nknots) {
     44    memset (spline[0].xk, 0, spline[0].Nknots * sizeof(opihi_flt));
     45    memset (spline[0].yk, 0, spline[0].Nknots * sizeof(opihi_flt));
     46    memset (spline[0].y2, 0, spline[0].Nknots * sizeof(opihi_flt));
     47  }
    4648}
    4749
Note: See TracChangeset for help on using the changeset viewer.