debug: include trailing \0 byte in call to zwp_virtual_keyboard_v1.keymap()

Ref: https://github.com/jjsullivan5196/wvkbd/issues/70
This commit is contained in:
Maarten van Gompel 2024-03-31 13:57:24 +02:00
parent 8106d7606d
commit 764c39633a

View File

@ -678,7 +678,7 @@ create_and_upload_keymap(struct kbd *kb, const char *name, uint32_t comp_unichr,
size_t keymap_size = strlen(keymap_template) + 64; size_t keymap_size = strlen(keymap_template) + 64;
char *keymap_str = malloc(keymap_size); char *keymap_str = malloc(keymap_size);
sprintf(keymap_str, keymap_template, comp_unichr, comp_shift_unichr); sprintf(keymap_str, keymap_template, comp_unichr, comp_shift_unichr);
keymap_size = strlen(keymap_str); keymap_size = strlen(keymap_str) + 1;
int keymap_fd = os_create_anonymous_file(keymap_size); int keymap_fd = os_create_anonymous_file(keymap_size);
if (keymap_fd < 0) { if (keymap_fd < 0) {
die("could not create keymap fd\n"); die("could not create keymap fd\n");