mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-14 14:38:09 +02:00
tools: verify the libxkbcommon utf8 symbols
This is mostly to shut up analyzers that aren't happy with the strcat usage here. Assisted-by: Claude:claude-opus-4-6 Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/388>
This commit is contained in:
parent
4ec936f016
commit
581806d28e
1 changed files with 2 additions and 1 deletions
|
|
@ -131,7 +131,8 @@ setup_xkb_keymap(struct ei_keymap *keymap)
|
|||
for (unsigned int evcode = KEY_Q; evcode <= KEY_Y; evcode++) {
|
||||
char utf8[7];
|
||||
xkb_keysym_t keysym = xkb_state_key_get_one_sym(xkbstate, evcode + 8);
|
||||
xkb_keysym_to_utf8(keysym, utf8, sizeof(utf8));
|
||||
int len = xkb_keysym_to_utf8(keysym, utf8, sizeof(utf8));
|
||||
assert(len > 0 && (size_t)len <= sizeof(utf8));
|
||||
strcat(layout, utf8);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue