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

vlistInqVarLongname: return CDI_MAX_NAME chars (bug fix).

parent 59efbbdf
......@@ -3,6 +3,10 @@
* using CGRIBEX library version 1.9.3
* Version 1.9.7 released
2019-05-17 Uwe Schulzweida
* vlistInqVarLongname: return CDI_MAX_NAME chars (bug fix)
2019-04-26 Uwe Schulzweida
* netCDF4: dimids are greater than ndims after ncrename (bug fix)
......
......@@ -579,7 +579,11 @@ void vlistInqVarLongname(int vlistID, int varID, char *longname)
}
}
else
strcpy(longname, vlistptr->vars[varID].longname);
{
// strcpy(longname, vlistptr->vars[varID].longname);
strncpy(longname, vlistptr->vars[varID].longname, CDI_MAX_NAME);
longname[CDI_MAX_NAME-1] = 0;
}
return;
}
......@@ -716,7 +720,7 @@ The function @func{vlistInqVarDatatype} returns the data type of a variable.
@Result
@func{vlistInqVarDatatype} returns an identifier to the data type of the variable.
The valid CDI data types are @func{CDI_DATATYPE_PACK8}, @func{CDI_DATATYPE_PACK16}, @func{CDI_DATATYPE_PACK24},
@func{CDI_DATATYPE_FLT32}, @func{CDI_DATATYPE_FLT64}, @func{CDI_DATATYPE_INT8}, @func{CDI_DATATYPE_INT16} and
@func{CDI_DATATYPE_FLT32}, @func{CDI_DATATYPE_FLT64}, @func{CDI_DATATYPE_INT8}, @func{CDI_DATATYPE_INT16} and
@func{CDI_DATATYPE_INT32}.
@EndFunction
......
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