Merge pull request #117388 from Brogolem35/rb_read_fix

`RingBuffer`: Fix `T read()` method reading empty buffer
This commit is contained in:
Thaddeus Crews
2026-03-13 12:14:02 -05:00
+1 -1
View File
@@ -48,7 +48,7 @@ class RingBuffer {
public:
T read() {
ERR_FAIL_COND_V(space_left() < 1, T());
ERR_FAIL_COND_V(data_left() < 1, T());
return data.ptr()[inc(read_pos, 1)];
}