summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2014-04-14 20:26:48 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2014-04-14 20:26:48 +0100
commit396fae31a9c3f3aa8fe26e287050ec66cad1768a (patch)
tree5e60ba9155d711cf05a12acb09942a6d1365a54a /libs
parent7cc5f8b321e88afbe0bc71a42401a5f9e18288fb (diff)
Make sure that the input string doesn't go out of scope when using boost::tokenizer
Diffstat (limited to 'libs')
-rw-r--r--libs/pbd/debug.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/pbd/debug.cc b/libs/pbd/debug.cc
index fba457c83e..f967061c25 100644
--- a/libs/pbd/debug.cc
+++ b/libs/pbd/debug.cc
@@ -78,9 +78,10 @@ PBD::set_debug_bits (uint64_t bits)
int
PBD::parse_debug_options (const char* str)
{
+ string in_str = str;
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
boost::char_separator<char> sep (",");
- tokenizer tokens (string(str), sep);
+ tokenizer tokens (in_str, sep);
uint64_t bits = 0;
for (tokenizer::iterator tok_iter = tokens.begin(); tok_iter != tokens.end(); ++tok_iter) {