Merge pull request #117388 from Brogolem35/rb_read_fix
`RingBuffer`: Fix `T read()` method reading empty buffer
This commit is contained in:
@@ -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)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user