aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/channel.c
diff options
context:
space:
mode:
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