Fix of escape_strings_cstyle(), which did not enclose a single word
string containing semicolon ';' character into quotes.
This commit is contained in:
parent
e20a06a850
commit
e83d89dee7
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ std::string escape_strings_cstyle(const std::vector<std::string> &strs)
|
||||||
bool should_quote = strs.size() == 1 && str.empty();
|
bool should_quote = strs.size() == 1 && str.empty();
|
||||||
for (size_t i = 0; i < str.size(); ++ i) {
|
for (size_t i = 0; i < str.size(); ++ i) {
|
||||||
char c = str[i];
|
char c = str[i];
|
||||||
if (c == ' ' || c == '\t' || c == '\\' || c == '"' || c == '\r' || c == '\n') {
|
if (c == ' ' || c == ';' || c == '\t' || c == '\\' || c == '"' || c == '\r' || c == '\n') {
|
||||||
should_quote = true;
|
should_quote = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue