mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
fix(rpc): do not crash when no input is consumed
fixes #23781 Co-authored-by: glacambre <code@lacamb.re>
This commit is contained in:
@@ -123,7 +123,10 @@ char *rbuffer_read_ptr(RBuffer *buf, size_t *read_count) FUNC_ATTR_NONNULL_ALL
|
||||
void rbuffer_consumed(RBuffer *buf, size_t count)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
assert(count && count <= buf->size);
|
||||
if (count == 0) {
|
||||
return;
|
||||
}
|
||||
assert(count <= buf->size);
|
||||
|
||||
buf->read_ptr += count;
|
||||
if (buf->read_ptr >= buf->end_ptr) {
|
||||
|
Reference in New Issue
Block a user