From 2bcfca7a468c3350ce9a28a9a18dce623a7645ee Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 21 Feb 2025 16:33:10 +0100 Subject: Some fixes and tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libterminput_marshal_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libterminput_marshal_input.c') diff --git a/libterminput_marshal_input.c b/libterminput_marshal_input.c index 9949838..4064956 100644 --- a/libterminput_marshal_input.c +++ b/libterminput_marshal_input.c @@ -3,13 +3,13 @@ int -libterminput_marshal_input(struct libterminput_marshaller *how, const union libterminput_input *what) /* TODO test */ +libterminput_marshal_input(struct libterminput_marshaller *how, const union libterminput_input *what) { enum libterminput_type type = what->type; if (how->store(how, &type, sizeof(type))) return -1; if (type == LIBTERMINPUT_NONE) { - if (what->keypress.key == LIBTERMINPUT_SYMBOL) + if (what->keypress.key != LIBTERMINPUT_SYMBOL) type = LIBTERMINPUT_KEYPRESS; if (how->store(how, &type, sizeof(type))) return -1; -- cgit v1.2.3-70-g09d2