Skip to content
Snippets Groups Projects
Commit d3675972 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdf_put_att_text: use precision specifier to print non null terminated strings

parent eb7ed465
No related branches found
No related tags found
No related merge requests found
......@@ -701,8 +701,7 @@ void cdf_put_att_text(int ncid, int varid, const char *name, size_t len,
status = nc_put_att_text(ncid, varid, name, len, tp);
if ( CDF_Debug || status != NC_NOERR )
Message("ncid = %d varid = %d att = %s text = %s",
ncid, varid, name, tp);
Message("ncid = %d varid = %d att = %s text = %.*s", ncid, varid, name, (int)len, tp);
if ( status != NC_NOERR ) Error("%s", nc_strerror(status));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment