summaryrefslogtreecommitdiff
path: root/scene/resources/resource_format_text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/resource_format_text.cpp')
-rw-r--r--scene/resources/resource_format_text.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 1d5f29ab14..cf8be8fe15 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -838,6 +838,11 @@ Error ResourceLoaderText::rename_dependencies(FileAccess *p_f, const String &p_p
f->seek(tag_end);
uint8_t c = f->get_8();
+ if (c == '\n' && !f->eof_reached()) {
+ // Skip first newline character since we added one
+ c = f->get_8();
+ }
+
while (!f->eof_reached()) {
fw->store_8(c);
c = f->get_8();