diff options
-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 |