summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-22 00:31:25 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-22 00:31:25 +0200
commit3ac1a2e3595ab186d3cf752f1ae5e165684aab0a (patch)
tree334851766d04baf1b63ac445994992a7381760c1
parent2b2d6ad0541544074fd54c86af6de2e2947e62ce (diff)
Oops, unbreak mc protocol
-rw-r--r--idle.c6
1 files changed, 5 insertions, 1 deletions
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