aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/channel.c
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2017-06-21 16:59:52 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-09-12 15:52:54 -0700
commite9cf515888705640ebd754483349f2bf84c32255 (patch)
treea8709dfdb9e5e6090b47fc601e6bc21350f78fac /src/nvim/channel.c
parent426399c2c4dd325bf00ffe1f410c1b9fd5053692 (diff)
downloadrneovim-e9cf515888705640ebd754483349f2bf84c32255.tar.gz
rneovim-e9cf515888705640ebd754483349f2bf84c32255.tar.bz2
rneovim-e9cf515888705640ebd754483349f2bf84c32255.zip
UIAttach, UIDetach
Diffstat (limited to 'src/nvim/channel.c')
-rw-r--r--src/nvim/channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/channel.c b/src/nvim/channel.c
index 104c79efd9..f9102fa0e2 100644
--- a/src/nvim/channel.c
+++ b/src/nvim/channel.c
@@ -172,6 +172,7 @@ static Channel *channel_alloc(ChannelStreamType type)
chan->refcount = 1;
chan->exit_status = -1;
chan->streamtype = type;
+ assert(chan->id <= VARNUMBER_MAX);
pmap_put(uint64_t)(channels, chan->id, chan);
return chan;
}
@@ -190,6 +191,7 @@ void channel_create_event(Channel *chan, const char *ext_source)
source = (const char *)IObuff;
}
+ assert(chan->id <= VARNUMBER_MAX);
Dictionary info = channel_info(chan->id);
typval_T tv = TV_INITIAL_VALUE;
// TODO(bfredl): do the conversion in one step. Also would be nice