Skip to content

Commit

Permalink
Fixed CORE-6499: Regression: gstat with switch -t executed via servic…
Browse files Browse the repository at this point in the history
…es fails with "found unknown switch" error
  • Loading branch information
AlexPeshkoff committed Mar 10, 2021
1 parent 0104420 commit 6d8be2c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/jrd/svc.cpp
Expand Up @@ -2882,6 +2882,30 @@ bool Service::process_switches(ClumpletReader& spb, string& switches)
{
string s;
spb.getString(s);

bool inStr = false;
for (FB_SIZE_T i = 0; i < s.length(); ++i)
{
if (s[i] == SVC_TRMNTR)
{
s.erase(i, 1);
if (inStr)
{
if (i < s.length() && s[i] != SVC_TRMNTR)
{
inStr = false;
continue;
}
}
else
{
inStr = true;
continue;
}
}
++i;
}

switches += s;
switches += ' ';
}
Expand Down

0 comments on commit 6d8be2c

Please sign in to comment.