Ring Buffer Implementation Does Not Work As Intend

Ring Buffer Implementation Does Not Work As Intend