Skip to content

Commit

Permalink
Bug corrections for invalid input checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
lingfeiwang committed May 11, 2016
1 parent 2203fde commit e3d289a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ URL_LIB="https://github.com/lingfeiwang/findr"
URL_BIN="https://github.com/lingfeiwang/findr-bin"
URL_PYTHON="https://github.com/lingfeiwang/findr-python"
URL_R="https://github.com/lingfeiwang/findr-R"
URL_DOC="https://github.com/lingfeiwang/findr/blob/gh-pages/doc.pdf"
URL_DOC="https://github.com/lingfeiwang/findr/blob/master/doc.pdf"
VERSION1=0
VERSION2=1
VERSION3=0
Expand Down
2 changes: 1 addition & 1 deletion pij/gassist/llrtopij_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int pij_gassist_llrtopij_a_convert(const MATRIXF* d,const MATRIXF* dconv,MATRIXF
{
FTYPE dmin,dmax;
MATRIXFF(minmax)(d,&dmin,&dmax);
if(!(dmin>=0))
if((!(dmin>=0))||gsl_isnan(dmax)||gsl_isinf(dmax))
ERRRET("Negative or NAN found in input data. It may invalidate follow up analysis. This may be due to incorrect previous steps.")
h=pij_llrtopij_a_nullhist((double)dmax,nv,ns,d->size2,n1d,n2d);
if(!h)
Expand Down
2 changes: 1 addition & 1 deletion pij/llrtopij_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int pij_llrtopij_a_convert_single(const MATRIXF* d,const MATRIXF* dconv,MATRIXF*
{
FTYPE dmin,dmax;
MATRIXFF(minmax)(d,&dmin,&dmax);
if(!(dmin>=0))
if((!(dmin>=0))||gsl_isnan(dmax)||gsl_isinf(dmax))
ERRRET("Negative or NAN found in input data. It may invalidate follow up analysis. This may be due to incorrect previous steps.")
h=pij_llrtopij_a_nullhist_single((double)dmax,d->size2,n1,n2);
if(!h)
Expand Down

0 comments on commit e3d289a

Please sign in to comment.