From 3ac1a2e3595ab186d3cf752f1ae5e165684aab0a Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 22 Jun 2020 00:31:25 +0200 Subject: Oops, unbreak mc protocol --- idle.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'idle.c') diff --git a/idle.c b/idle.c index ef588fd..bfb8fc8 100644 --- a/idle.c +++ b/idle.c @@ -112,9 +112,13 @@ write_bytes(char **pos, const char *bytes, size_t n) static inline void write_str(char **pos, const char *str) { + size_t len; + assert_return(pos && *pos && !empty_str(str)); - write_bytes(pos, str, strlen(str)); + len = strlen(str); + write_varint(pos, len); + write_bytes(pos, str, len); } static inline void -- cgit v1.2.3