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

gribapiAddRecord: init longname and units

parent 5a276865
......@@ -656,6 +656,10 @@ void gribapiAddRecord(int streamID, int param, grib_handle *gh,
if ( prec > 32 ) prec = DATATYPE_PACK32;
if ( prec < 0 ) prec = DATATYPE_PACK;
name[0] = 0;
longname[0] = 0;
units[0] = 0;
vlen = 256;
GRIB_CHECK(grib_get_string(gh, "shortName", name, &vlen), 0);
if ( vlen == 8 && memcmp(name, "unknown", vlen) == 0 ) name[0] = 0;
......
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