diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-04-16 14:45:50 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-04-16 14:45:50 +0200 |
commit | c04b3edac4fb1f99f7a58bb3b634954666db47e6 (patch) | |
tree | 580b19f9d09d06c228dd5aac4af35d156348c165 | |
parent | bf0f9141409fd5f754c2b4e8dea0e5ea6f156896 (diff) | |
parent | 7a18bb8ace4bc7a639a1db92826fa16097fda803 (diff) |
Merge pull request #4337 from bojidar-bg/translation-csv-newlines
Fix File.get_csv_line not including quoted newlines in the output
-rw-r--r-- | core/os/file_access.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 0846ef3eb0..a3ee9395de 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -284,7 +284,7 @@ Vector<String> FileAccess::get_csv_line(String delim) const { String l; int qc=0; do { - l+=get_line(); + l+=get_line()+"\n"; qc=0; for(int i=0;i<l.length();i++) { @@ -295,6 +295,8 @@ Vector<String> FileAccess::get_csv_line(String delim) const { } while (qc%2); + l=l.substr(0, l.length()-1); + Vector<String> strings; bool in_quote=false; |