diff --git a/cpp/ring_buffer.h b/cpp/ring_buffer.h index f6d20a0..65d8024 100644 --- a/cpp/ring_buffer.h +++ b/cpp/ring_buffer.h @@ -56,7 +56,7 @@ public: _capacity = 0; // fill up the end, then wrap around to start. if (_ptr + dsize > Size) { - int amt = Size - _ptr; + size_t amt = Size - _ptr; memcpy(_buffer + _ptr, data, amt); _ptr = 0; dsize -= amt;