aboutsummaryrefslogtreecommitdiff
path: root/src/mpack/mpack_core.c
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:55 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:55 +0000
commit067dc73729267c0262438a6fdd66e586f8496946 (patch)
treed2e832f1a08083fd1457aaba9a774e72d69e5266 /src/mpack/mpack_core.c
parentcd16d3df4c2a21ada895a1353712969045e5c728 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-067dc73729267c0262438a6fdd66e586f8496946.tar.gz
rneovim-067dc73729267c0262438a6fdd66e586f8496946.tar.bz2
rneovim-067dc73729267c0262438a6fdd66e586f8496946.zip
Merge remote-tracking branch 'upstream/master' into fix_repeatcmdline
Diffstat (limited to 'src/mpack/mpack_core.c')
-rw-r--r--src/mpack/mpack_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mpack/mpack_core.c b/src/mpack/mpack_core.c
index 4ee67a032a..3424f444b9 100644
--- a/src/mpack/mpack_core.c
+++ b/src/mpack/mpack_core.c
@@ -173,6 +173,9 @@ MPACK_API int mpack_write(mpack_tokbuf_t *tokbuf, char **buf, size_t *buflen,
int mpack_rtoken(const char **buf, size_t *buflen, mpack_token_t *tok)
{
+ if (*buflen == 0) {
+ return MPACK_EOF;
+ }
unsigned char t = ADVANCE(buf, buflen);
if (t < 0x80) {
/* positive fixint */