From e8162970dea20ec6ac93625cb52dcfe386ff430f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 18 Oct 2023 08:01:47 -0400 Subject: [PATCH] Another tweak to protect against invalid argument in pctile(). --- lib/pctile.f90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/pctile.f90 b/lib/pctile.f90 index 6fde9dd99..a980deaa5 100644 --- a/lib/pctile.f90 +++ b/lib/pctile.f90 @@ -3,7 +3,10 @@ subroutine pctile(x,npts,npct,xpct) real x(npts) real,allocatable :: tmp(:) - if(npts.lt.0) go to 900 + if(npts.lt.0 .or. npct.lt.0 .or. npct.gt.100) then + xpct=1.0 + go to 900 + endif allocate(tmp(npts)) tmp=x