Skip to content

Commit c10a46c

Browse files
authored
[BridgeLink] Support version on designator (#366)
1 parent 4fe0771 commit c10a46c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

BridgeLink/BridgeLink.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,12 @@ namespace Plugin {
732732
}
733733
_adminLock.Unlock();
734734

735-
if ((link != nullptr) && (method.length() > _callsign.length())) {
736-
ASSERT(method.at(_callsign.length()) == PluginHost::ICompositPlugin::Delimiter);
735+
if (link != nullptr) {
737736
// Do not forget to takeof "our" callsign
738-
string strippedMethod = method.substr(_callsign.length() + 1);
739-
result = link->Invoke(channelid, id, token, strippedMethod, parameters, response);
737+
const size_t pos = method.find(PluginHost::ICompositPlugin::Delimiter);
738+
ASSERT(pos != string::npos);
739+
ASSERT(_callsign == method.substr(0, pos));
740+
result = link->Invoke(channelid, id, token, method.substr(pos + 1), parameters, response);
740741
link->Release();
741742
}
742743
return (result);

0 commit comments

Comments
 (0)