use sizeof(buffer) instead of hardcoded 32

This commit is contained in:
Hiltjo Posthuma 2021-03-28 14:58:19 +02:00
parent 4b5a61b275
commit 8f6a7b5e42
1 changed files with 1 additions and 1 deletions

View File

@ -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);