Fix comment in control message serialization

Refs 245999aec4

Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
Yu-Chen Lin 2021-12-04 10:54:21 +08:00 committed by Romain Vimont
parent 94702a4309
commit daa06abd34

View file

@ -69,7 +69,7 @@ write_position(uint8_t *buf, const struct sc_position *position) {
buffer_write16be(&buf[10], position->screen_size.height); buffer_write16be(&buf[10], position->screen_size.height);
} }
// write length (2 bytes) + string (non nul-terminated) // write length (4 bytes) + string (non null-terminated)
static size_t static size_t
write_string(const char *utf8, size_t max_len, unsigned char *buf) { write_string(const char *utf8, size_t max_len, unsigned char *buf) {
size_t len = sc_str_utf8_truncation_index(utf8, max_len); size_t len = sc_str_utf8_truncation_index(utf8, max_len);