diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-21 16:33:10 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-21 16:33:10 +0100 |
commit | 2bcfca7a468c3350ce9a28a9a18dce623a7645ee (patch) | |
tree | 5d7b8a1c0508fe49661be405416c3b421cad2925 /libterminput_unmarshal_keypress__.c | |
parent | Update readme (diff) | |
download | libterminput-master.tar.gz libterminput-master.tar.bz2 libterminput-master.tar.xz |
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libterminput_unmarshal_keypress__.c')
-rw-r--r-- | libterminput_unmarshal_keypress__.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libterminput_unmarshal_keypress__.c b/libterminput_unmarshal_keypress__.c index f4b4fc6..bd67e1e 100644 --- a/libterminput_unmarshal_keypress__.c +++ b/libterminput_unmarshal_keypress__.c @@ -3,14 +3,14 @@ int -libterminput_unmarshal_keypress__(struct libterminput_unmarshaller *how, struct libterminput_keypress *what) /* TODO test */ +libterminput_unmarshal_keypress__(struct libterminput_unmarshaller *how, struct libterminput_keypress *what) { what->type = LIBTERMINPUT_KEYPRESS; if (how->load(how, &what->key, sizeof(what->key)) || how->load(how, &what->times, sizeof(what->times)) || how->load(how, &what->mods, sizeof(what->mods))) return -1; - if ((uintmax_t)what->key > (uintmax_t)LIBTERMINPUT_KEYPAD__LAST__) { + if ((uintmax_t)what->key > (uintmax_t)LIBTERMINPUT_LAST_KEY__) { errno = EINVAL; return -1; } |