Skip to content

Commit

Permalink
Backported CORE-6499: Regression: gstat with switch -t executed via s…
Browse files Browse the repository at this point in the history
…ervices fails with "found unknown switch" error
  • Loading branch information
AlexPeshkoff committed Mar 10, 2021
1 parent c6fb53f commit f0c193d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/jrd/svc.cpp
Expand Up @@ -2860,6 +2860,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 f0c193d

Please sign in to comment.