IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 15, 2009, 3:59:23 PM (17 years ago)
Author:
eugene
Message:

updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/extsrc/gpcsw/gpcsrc/fits/burntool/trailfit.c

    r23924 r25404  
    226226/* FIXME: sanity check fits */
    227227   if(slope >= FIT_MAX_SLOPE || slope < FIT_MIN_SLOPE) {
     228      box->slope = slope;
     229      box->nfit = 0;
    228230      box->fiterr = FIT_SLOPE_ERROR;
    229231      return(-1);
     
    283285   }
    284286/* Update fit ranges */
    285    box->sxfit = box->xfit[0];
    286    box->exfit = box->xfit[box->nfit-1];
    287 
     287   if(box->nfit > 0) {
     288      box->sxfit = box->xfit[0];
     289      box->exfit = box->xfit[box->nfit-1];
     290   } else {
     291      box->sxfit = xs;
     292      box->exfit = xs - 1;
     293      box->fiterr = FIT_ALL_GONE;
     294   }
     295//   if(box->nfit <= 0) fprintf(stderr, "WHOA, got nfit = 0\n");
    288296   return(0);
    289297}
Note: See TracChangeset for help on using the changeset viewer.