Fix incorrect comment

Comment had not been updated along with the code.
This commit is contained in:
Romain Vimont 2019-01-22 09:38:51 +01:00
parent 0bfaf7b7ff
commit 7764a836f1

View file

@ -23,7 +23,7 @@ int control_event_serialize(const struct control_event *event, unsigned char *bu
buffer_write32be(&buf[6], event->keycode_event.metastate);
return 10;
case CONTROL_EVENT_TYPE_TEXT: {
// write length (1 byte) + date (non nul-terminated)
// write length (2 bytes) + string (non nul-terminated)
size_t len = strlen(event->text_event.text);
if (len > TEXT_MAX_LENGTH) {
// injecting a text takes time, so limit the text length