Merge pull request #23901 from allkhor/fixed_store_csv_line

FileAccess::store_csv_line() don't added unnecessary double quotes.
This commit is contained in:
Rémi Verschelde 2018-11-22 14:58:16 +01:00 committed by GitHub
commit 8180e5e546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -534,7 +534,7 @@ void FileAccess::store_csv_line(const Vector<String> &p_values, const String &p_
for (int i = 0; i < size; ++i) {
String value = p_values[i];
if (value.find("\"") != -1 || value.find(p_delim) != -1 || value.find("\n")) {
if (value.find("\"") != -1 || value.find(p_delim) != -1 || value.find("\n") != -1) {
value = "\"" + value.replace("\"", "\"\"") + "\"";
}
if (i < size - 1) {