diff --git a/zcm/blocking.cpp b/zcm/blocking.cpp index eaddd0f4..83b2a4f1 100644 --- a/zcm/blocking.cpp +++ b/zcm/blocking.cpp @@ -489,7 +489,7 @@ zcm_sub_t* zcm_blocking_t::subscribe(const string& channel, sub->usr = usr; sub->regex = isRegexChannel(channel); if (sub->regex) { - sub->regexobj = (void*) new std::regex(sub->channel); + sub->regexobj = (void*) new std::regex(channel); ZCM_ASSERT(sub->regexobj); subsRegex[channel].push_back(sub); } else {