diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:29:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-12 20:29:40 +0000 |
commit | 72928df58f70c833020fdabb81de38df0001e8af (patch) | |
tree | e9b973a634994d496e683d2ed8900bb5cf9650af /libs/pbd/xml++.cc | |
parent | c7dd29e1676624a54cbdae28218cb5df91ae9837 (diff) |
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
Diffstat (limited to 'libs/pbd/xml++.cc')
-rw-r--r-- | libs/pbd/xml++.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index dc27b8b1a5..1b006fd63d 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -406,8 +406,8 @@ XMLNode::add_property(const char* n, const char* v) XMLProperty* XMLNode::add_property(const char* name, const long value) { - static char str[1024]; - snprintf(str, 1024, "%ld", value); + char str[64]; + snprintf(str, sizeof(str), "%ld", value); return add_property(name, str); } |