mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
input: legacy: reduce size of reply buffer
Its maximum size is known; the only two variables are two integers. We know the maximum length of an integer converted to a string.
This commit is contained in:
parent
28ad0ca602
commit
ce8ea2db66
1 changed files with 1 additions and 1 deletions
2
input.c
2
input.c
|
|
@ -1083,7 +1083,7 @@ legacy_kbd_protocol(struct seat *seat, struct terminal *term,
|
|||
int modify_param = mod_param_map[keymap_mods];
|
||||
xassert(modify_param != 0);
|
||||
|
||||
char reply[1024];
|
||||
char reply[32];
|
||||
size_t n = xsnprintf(reply, sizeof(reply), "\x1b[27;%d;%d~", modify_param, sym);
|
||||
term_to_slave(term, reply, n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue