fix problem with extra spaces after protocol name in link

This commit is contained in:
2020-08-18 14:43:56 +02:00
parent bf55d4c202
commit 8b9359723a
2 changed files with 9 additions and 6 deletions

View File

@ -189,7 +189,10 @@ parse(const char* filename, const char* _protocolname)
protocolname = _protocolname; protocolname = _protocolname;
// extract substitutions from protocolname "name ( sub1, sub2 ) " // extract substitutions from protocolname "name ( sub1, sub2 ) "
ssize_t i = protocolname.find('('); ssize_t i = protocolname.find('(');
if (i >= 0) if (i < 0) i = 0;
while (protocolname[i-1] == ' ')
protocolname.remove(--i, 1);
if (protocolname[i] == '(')
{ {
while (i < (ssize_t)protocolname.length()) while (i < (ssize_t)protocolname.length())
{ {