skip extra newline in .tscn when renaming dependency

(cherry picked from commit 40ce9bfc2d)
This commit is contained in:
rileylyman 2020-05-25 14:25:34 -07:00 committed by Rémi Verschelde
parent 4bf141a47e
commit 3c5fb3bbc7
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -800,6 +800,11 @@ Error ResourceInteractiveLoaderText::rename_dependencies(FileAccess *p_f, const
f->seek(tag_end); f->seek(tag_end);
uint8_t c = f->get_8(); 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()) { while (!f->eof_reached()) {
fw->store_8(c); fw->store_8(c);
c = f->get_8(); c = f->get_8();