summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r--libs/ardour/vst_plugin.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc
index 8d8d46e090..2d5579b965 100644
--- a/libs/ardour/vst_plugin.cc
+++ b/libs/ardour/vst_plugin.cc
@@ -810,9 +810,10 @@ VSTPlugin::has_editor () const
}
bool
-VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
+VSTPlugin::print_parameter (uint32_t param, std::string& rv) const
{
- char *first_nonws;
+ char buf[64];
+ size_t len = sizeof(buf);
assert (len > VestigeMaxShortLabelLen);
memset (buf, 0, len);
@@ -824,9 +825,9 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
buf[len - 1] = '\0';
- first_nonws = buf;
+ char* first_nonws = buf;
while (*first_nonws && isspace (*first_nonws)) {
- first_nonws++;
+ ++first_nonws;
}
if (*first_nonws == '\0') {
@@ -845,6 +846,7 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
strncat (buf, lbl.c_str(), strlen (buf) - 1);
}
+ rv = std::string (buf);
return true;
}