mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-30 04:32:27 -04:00
Check for invalid argument in pctile().
This commit is contained in:
parent
893565f40d
commit
97ed4022a2
@ -3,6 +3,7 @@ subroutine pctile(x,npts,npct,xpct)
|
|||||||
real x(npts)
|
real x(npts)
|
||||||
real,allocatable :: tmp(:)
|
real,allocatable :: tmp(:)
|
||||||
|
|
||||||
|
if(npts.lt.0) go to 900
|
||||||
allocate(tmp(npts))
|
allocate(tmp(npts))
|
||||||
|
|
||||||
tmp=x
|
tmp=x
|
||||||
@ -11,6 +12,7 @@ subroutine pctile(x,npts,npct,xpct)
|
|||||||
if(j.lt.1) j=1
|
if(j.lt.1) j=1
|
||||||
if(j.gt.npts) j=npts
|
if(j.gt.npts) j=npts
|
||||||
xpct=tmp(j)
|
xpct=tmp(j)
|
||||||
|
deallocate(tmp)
|
||||||
|
|
||||||
return
|
900 return
|
||||||
end subroutine pctile
|
end subroutine pctile
|
||||||
|
Loading…
x
Reference in New Issue
Block a user