Fix escaping of quotes in coverage helper

This commit is contained in:
Martin Hořeňovský 2019-09-21 23:19:45 +02:00
parent fc2066bf18
commit de42f8a93e
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -29,7 +29,8 @@ std::string escape_arg(const std::string& arg) {
escaped.append(num_backslashes * 2, '\\');
break;
} else if (*it == '"') {
escaped.append(num_backslashes * 2 + 1, '\\');
escaped.append((num_backslashes + 1) * 2, '\\');
escaped.push_back('"');
escaped.push_back(*it);
} else {
escaped.append(num_backslashes, '\\');