Commit c2b2d32e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

find_leadtime: check number of dimensions [Bug #7779]

parent 38bfb9f4
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.8.1
* Version 1.9.0 released
2017-06-21 Uwe Schulzweida
* find_leadtime: check number of dimensions [Bug #7779]
2017-06-06 Uwe Schulzweida
* Changed boolean ints to stdbool
......
......@@ -3411,11 +3411,12 @@ int find_leadtime(int nvars, ncvar_t *ncvars)
for ( int ncvarid = 0; ncvarid < nvars; ncvarid++ )
{
if ( ncvars[ncvarid].stdname[0] && strcmp(ncvars[ncvarid].stdname, "forecast_period") == 0 )
{
leadtime_id = ncvarid;
break;
}
if ( ncvars[ncvarid].ndims == 1 )
if ( ncvars[ncvarid].stdname[0] && strcmp(ncvars[ncvarid].stdname, "forecast_period") == 0 )
{
leadtime_id = ncvarid;
break;
}
}
return leadtime_id;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment