Skip to content

Commit 6d8be2c

Browse files
committed
Fixed CORE-6499: Regression: gstat with switch -t executed via services fails with "found unknown switch" error
1 parent 0104420 commit 6d8be2c

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/jrd/svc.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,6 +2882,30 @@ bool Service::process_switches(ClumpletReader& spb, string& switches)
28822882
{
28832883
string s;
28842884
spb.getString(s);
2885+
2886+
bool inStr = false;
2887+
for (FB_SIZE_T i = 0; i < s.length(); ++i)
2888+
{
2889+
if (s[i] == SVC_TRMNTR)
2890+
{
2891+
s.erase(i, 1);
2892+
if (inStr)
2893+
{
2894+
if (i < s.length() && s[i] != SVC_TRMNTR)
2895+
{
2896+
inStr = false;
2897+
continue;
2898+
}
2899+
}
2900+
else
2901+
{
2902+
inStr = true;
2903+
continue;
2904+
}
2905+
}
2906+
++i;
2907+
}
2908+
28852909
switches += s;
28862910
switches += ' ';
28872911
}

0 commit comments

Comments
 (0)