[crash] missed expanding the alt buffer in line_buffer

This commit is contained in:
Tim Stack 2022-08-04 09:23:40 -07:00
parent 4e0dab843a
commit 7077495389
1 changed files with 4 additions and 0 deletions

View File

@ -947,6 +947,10 @@ line_buffer::fill_range(file_off_t start, ssize_t max_length)
// log_debug("allocating new buffer!");
this->lb_alt_buffer
= auto_buffer::alloc(this->lb_buffer.capacity());
} else if (this->lb_alt_buffer->capacity()
< this->lb_buffer.capacity())
{
this->lb_alt_buffer->expand_to(this->lb_buffer.capacity());
}
this->lb_alt_buffer->resize(this->lb_buffer.size()
- usable_size);