Commit 2f47d931 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdf_set_cdi_attr: bug fix for length of string attributes.

parent b41c0a34
2019-03-01 Uwe Schulzweida
* cdf_set_cdi_attr: bug fix for length of string attributes
2019-02-27 Uwe Schulzweida
* GRIB2: added support for inventory key typeOfGeneratingProcess
......
......@@ -181,8 +181,7 @@ institute_t *instituteNewEntry(cdiResH resH, int center, int subcenter,
int institutDef(int center, int subcenter, const char *name, const char *longname)
{
institute_t * instituteptr
= instituteNewEntry(CDI_UNDEFID, center, subcenter, name, longname);
institute_t *instituteptr = instituteNewEntry(CDI_UNDEFID, center, subcenter, name, longname);
return instituteptr->self;
}
......
......@@ -888,7 +888,7 @@ void cdf_set_cdi_attr(int ncid, int ncvarid, int attnum, int cdiID, int varID)
{
char attstring[8192];
cdfGetAttText(ncid, ncvarid, attname, sizeof(attstring), attstring);
cdiDefAttTxt(cdiID, varID, attname, (int)attlen, attstring);
cdiDefAttTxt(cdiID, varID, attname, strlen(attstring), attstring);
}
}
......
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