make XMLNode::add_property() correctly re-entrant and reduce the size of the tmp buffer used to print a long integer
git-svn-id: svn://localhost/ardour2/branches/3.0@9131 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c7dd29e167
commit
72928df58f
@ -406,8 +406,8 @@ XMLNode::add_property(const char* n, const char* v)
|
|||||||
XMLProperty*
|
XMLProperty*
|
||||||
XMLNode::add_property(const char* name, const long value)
|
XMLNode::add_property(const char* name, const long value)
|
||||||
{
|
{
|
||||||
static char str[1024];
|
char str[64];
|
||||||
snprintf(str, 1024, "%ld", value);
|
snprintf(str, sizeof(str), "%ld", value);
|
||||||
return add_property(name, str);
|
return add_property(name, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user