diff --git a/app/src/control_msg.c b/app/src/control_msg.c index 252a3425..72504138 100644 --- a/app/src/control_msg.c +++ b/app/src/control_msg.c @@ -67,7 +67,7 @@ control_msg_serialize(const struct control_msg *msg, unsigned char *buf) { (uint32_t) msg->inject_scroll_event.vscroll); return 21; case CONTROL_MSG_TYPE_SET_CLIPBOARD: { - size_t len = write_string(msg->inject_text.text, + size_t len = write_string(msg->set_clipboard.text, CONTROL_MSG_CLIPBOARD_TEXT_MAX_LENGTH, &buf[1]); return 1 + len; diff --git a/app/tests/test_control_msg_serialize.c b/app/tests/test_control_msg_serialize.c index 4dc79018..da243d91 100644 --- a/app/tests/test_control_msg_serialize.c +++ b/app/tests/test_control_msg_serialize.c @@ -200,7 +200,7 @@ static void test_serialize_get_clipboard(void) { static void test_serialize_set_clipboard(void) { struct control_msg msg = { .type = CONTROL_MSG_TYPE_SET_CLIPBOARD, - .inject_text = { + .set_clipboard = { .text = "hello, world!", }, };