ropes: Fix a buffer overflow in `RopeBuffer.add`.