diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-22 00:31:25 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-22 00:31:25 +0200 |
commit | 3ac1a2e3595ab186d3cf752f1ae5e165684aab0a (patch) | |
tree | 334851766d04baf1b63ac445994992a7381760c1 | |
parent | 2b2d6ad0541544074fd54c86af6de2e2947e62ce (diff) |
Oops, unbreak mc protocol
-rw-r--r-- | idle.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |