This return required for the first case as well? (Buffer is full, wrap back). Shouldn't the for(;;) catch this nicely?