diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/lib/kbd_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lib/kbd_helper.c b/apps/plugins/lib/kbd_helper.c index 00191c3532..4eba082ce1 100644 --- a/apps/plugins/lib/kbd_helper.c +++ b/apps/plugins/lib/kbd_helper.c | |||
@@ -40,7 +40,7 @@ int kbd_create_layout(char *layout, unsigned short *buf, int bufsz) | |||
40 | const unsigned char *p = layout; | 40 | const unsigned char *p = layout; |
41 | int len = 0; | 41 | int len = 0; |
42 | pbuf = buf; | 42 | pbuf = buf; |
43 | while (*p && (pbuf - buf + 8) < bufsz) | 43 | while (*p && (pbuf - buf + sizeof(unsigned short)) < bufsz) |
44 | { | 44 | { |
45 | p = rb->utf8decode(p, &pbuf[len+1]); | 45 | p = rb->utf8decode(p, &pbuf[len+1]); |
46 | if (pbuf[len+1] == '\n') | 46 | if (pbuf[len+1] == '\n') |