Perhaps the code should also just double the buffer. I can send another patch for that if needed.
Attach a file by drag & drop or click to upload