svkbd

simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log | Files | Refs | README | LICENSE

commit 8f6a7b5e42e0614d83bd2a2efe2155cf75cc1eaa
parent 4b5a61b27500e6b33bd560756f744ce7fe2dee29
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 28 Mar 2021 14:58:19 +0200

use sizeof(buffer) instead of hardcoded 32

Diffstat:
Msvkbd.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/svkbd.c b/svkbd.c @@ -507,7 +507,7 @@ printkey(Key *k, KeySym mod) char buffer[32]; KeySym ignore; Status return_status; - int l = Xutf8LookupString(xic, &event, buffer, 32, &ignore, &return_status); + int l = Xutf8LookupString(xic, &event, buffer, sizeof(buffer), &ignore, &return_status); buffer[l] = '\0'; printdbg("Print buffer: [%s] (length=%d)\n", &buffer, l); printf("%s", buffer);