Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
d3675972
Commit
d3675972
authored
Feb 02, 2015
by
Uwe Schulzweida
Browse files
cdf_put_att_text: use precision specifier to print non null terminated strings
parent
eb7ed465
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cdf_int.c
View file @
d3675972
...
...
@@ -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
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment