summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-10-17 10:07:08 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-10-17 10:07:08 -0300
commit1028ab9d8101fef197cfcd4cf83ef4be320dc540 (patch)
tree2baa4137469ff4ee23c802f1aab505ee8ca41e02
parent5cc145904a6cb38647bfb4de1fac701157375c69 (diff)
parentd9583f8a7283bbeac1dceaf0885bba297961432e (diff)
Merge pull request #2520 from bojidar-bg/patch-3
Add missing \n to world_wrap.
-rw-r--r--core/ustring.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index e5419effcb..7582376fe0 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3066,7 +3066,7 @@ String String::world_wrap(int p_chars_per_line) const {
} else if (operator[](i)==' ' || operator[](i)=='\t') {
last_space=i;
} else if (operator[](i)=='\n') {
- ret+=substr(from,i-from);
+ ret+=substr(from,i-from)+"\n";
from=i+1;
last_space=-1;
}