aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBojidar Marinov2016-04-16 15:12:29 +0300
committerRémi Verschelde2016-04-27 08:50:03 +0200
commitff1d370b9f337f35801935be7a66cec02aaa50d3 (patch)
tree2401eb2302876de6ef30a2f0fef104a7a662b6a3
parente654184888672d63df28b1760b3d55461e58607d (diff)
downloadgodot-ff1d370b9f337f35801935be7a66cec02aaa50d3.tar.gz
godot-ff1d370b9f337f35801935be7a66cec02aaa50d3.tar.zst
godot-ff1d370b9f337f35801935be7a66cec02aaa50d3.zip
Fix File.get_csv_line not including quoted newlines in the output
Close #1232 (cherry picked from commit 7a18bb8ace4bc7a639a1db92826fa16097fda803)
-rw-r--r--core/os/file_access.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 0846ef3eb..a3ee9395d 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;