projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cc5f8b
)
Make sure that the input string doesn't go out of scope when using boost::tokenizer
author
John Emmas
<johne53@tiscali.co.uk>
Mon, 14 Apr 2014 19:26:48 +0000
(20:26 +0100)
committer
John Emmas
<johne53@tiscali.co.uk>
Mon, 14 Apr 2014 19:26:48 +0000
(20:26 +0100)
libs/pbd/debug.cc
patch
|
blob
|
history
diff --git
a/libs/pbd/debug.cc
b/libs/pbd/debug.cc
index fba457c83eeb256012b2b2f36dfae97a406c8861..f967061c25ded61485f813c6abe2df09c79c4211 100644
(file)
--- 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) {