> This can read past the end of the buffer in a few places if the buffer > ends with '\r' for some reason. We should probably handle that > possibility. > No, the buffer is guaranteed to end with a '\0': assert(Buffer.getBufferEnd()[0] == '\0')