summaryrefslogtreecommitdiffstats
path: root/drivers/unix/os_unix.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-26 19:30:58 +0000
committerGitHub <noreply@github.com>2024-11-26 19:30:58 +0000
commitb06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (patch)
tree79c2a4c34f2d888ff962d76edf474c518d1abdea /drivers/unix/os_unix.cpp
parentc5b1645e60a59c0292c04bece3fdb0715a61afea (diff)
parente58e18261ea7ed3978146ef8d77a900be2601be3 (diff)
downloadredot-engine-b06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e.tar.gz
Merge pull request #885 from Spartan322/merge/d09d82d
Merge commit godotengine/godot@d09d82d
Diffstat (limited to 'drivers/unix/os_unix.cpp')
-rw-r--r--drivers/unix/os_unix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 440b78e0b7..75bccf048c 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -193,7 +193,7 @@ String OS_Unix::get_stdin_string(int64_t p_buffer_size) {
Vector<uint8_t> data;
data.resize(p_buffer_size);
if (fgets((char *)data.ptrw(), data.size(), stdin)) {
- return String::utf8((char *)data.ptr());
+ return String::utf8((char *)data.ptr()).replace("\r\n", "\n").rstrip("\n");
}
return String();
}