You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
[File] Fix FileAccessCompressed::get_buffer return value.
It used to return the write index instead of the written bytes (i.e. index + 1) when reading until last block.
This commit is contained in:
@@ -312,10 +312,10 @@ uint64_t FileAccessCompressed::get_buffer(uint8_t *p_dst, uint64_t p_length) con
|
|||||||
} else {
|
} else {
|
||||||
read_block--;
|
read_block--;
|
||||||
at_end = true;
|
at_end = true;
|
||||||
if (i < p_length - 1) {
|
if (i + 1 < p_length) {
|
||||||
read_eof = true;
|
read_eof = true;
|
||||||
}
|
}
|
||||||
return i;
|
return i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user