Cap namelen
This commit is contained in:
parent
c795459bb4
commit
525ff083b1
1 changed files with 3 additions and 1 deletions
|
@ -78,9 +78,11 @@ kiwmi_keyboard_on_key_down_or_up_notify(
|
||||||
for (int i = 0; i < nsyms; ++i) {
|
for (int i = 0; i < nsyms; ++i) {
|
||||||
xkb_keysym_t sym = syms[i];
|
xkb_keysym_t sym = syms[i];
|
||||||
|
|
||||||
int namelen =
|
size_t namelen =
|
||||||
xkb_keysym_get_name(sym, keysym_name, sizeof(keysym_name));
|
xkb_keysym_get_name(sym, keysym_name, sizeof(keysym_name));
|
||||||
|
|
||||||
|
namelen = namelen > sizeof(keysym_name) ? sizeof(keysym_name) : namelen;
|
||||||
|
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, lc->callback_ref);
|
lua_rawgeti(L, LUA_REGISTRYINDEX, lc->callback_ref);
|
||||||
|
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
|
|
Loading…
Reference in a new issue