diff --git a/core/templates/ring_buffer.h b/core/templates/ring_buffer.h index 83d9b193173..9e7d71c2fe4 100644 --- a/core/templates/ring_buffer.h +++ b/core/templates/ring_buffer.h @@ -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)]; }