Introduction
Introduction Statistics Contact Development Disclaimer Help
use sizeof(buffer) instead of hardcoded 32 - svkbd - simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log
Files
Refs
README
LICENSE
---
commit 8f6a7b5e42e0614d83bd2a2efe2155cf75cc1eaa
parent 4b5a61b27500e6b33bd560756f744ce7fe2dee29
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 28 Mar 2021 14:58:19 +0200
use sizeof(buffer) instead of hardcoded 32
Diffstat:
M svkbd.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_st…
+ int l = Xutf8LookupString(xic, &event, buffer, sizeof(buffer), &ignore…
buffer[l] = '\0';
printdbg("Print buffer: [%s] (length=%d)\n", &buffer, l);
printf("%s", buffer);
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.