Skip to content

Commit

Permalink
bugfix of startswith option in oscrelay
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed May 9, 2024
1 parent fab965b commit fddea93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/src/tascarmod_oscrelay.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ int oscrelay_t::osc_recv(const char* path, const char*, lo_arg**, int,

int oscrelay_t::osc_recv(const char* lpath, lo_message msg)
{
bool start_matched = startswith.size() &&
(strlen(lpath) >= startswith.size()) &&
(strcmp(lpath, startswith.c_str()) == 0);
bool start_matched =
(startswith.size() > 0) && (strlen(lpath) >= startswith.size()) &&
(strncmp(lpath, startswith.c_str(), startswith.size()) == 0);
if(startswith.size() && (!start_matched))
return retval;
if(newpath.size()) {
Expand Down

0 comments on commit fddea93

Please sign in to comment.