1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Implement get_length() for pipes.

This commit is contained in:
Pāvels Nadtočajevs
2025-02-03 10:55:17 +02:00
parent f60f69aa57
commit e6e108d091
6 changed files with 21 additions and 4 deletions

View File

@@ -451,7 +451,7 @@ String FileAccess::get_line() const {
uint8_t c = get_8();
while (!eof_reached()) {
if (c == '\n' || c == '\0') {
if (c == '\n' || c == '\0' || get_error() != OK) {
line.push_back(0);
return String::utf8(line.get_data());
} else if (c != '\r') {