summaryrefslogtreecommitdiff
path: root/libs/surfaces/osc
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2017-08-25 09:44:08 -0700
committerLen Ovens <len@ovenwerks.net>2017-08-25 09:45:06 -0700
commitd7fcdbfe1d48bd74acbd8f3eb05563fb8a96da57 (patch)
treeb6a9d8c2802837f875cffcee4a7d7591f86c20a0 /libs/surfaces/osc
parent6e4c9490d44f19ab348cf2413276d7bff1ac0b54 (diff)
OSC: account for user sending the wrong number of paramters gracefully
Diffstat (limited to 'libs/surfaces/osc')
-rw-r--r--libs/surfaces/osc/osc.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 418b579c98..eb009c59a7 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -964,6 +964,10 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
ret = 0;
} else
+ if (strstr (path, "/strip") && (argc != 1)) {
+ // All of the strip commands below require 1 parameter
+ PBD::warning << "OSC: Wrong number of parameters." << endmsg;
+ } else
if (!strncmp (path, "/strip/gain/", 12) && strlen (path) > 12) {
// in dB
int ssid = atoi (&path[12]);