summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-07-27 22:28:57 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2020-07-28 02:37:13 +0000
commit9e2eceeb33cbb7756896d68372c835d0b9cc0c79 (patch)
tree548499c88800299982000f106826ca65ed375f06
parentf30f1bb467f9d7bd14b43311859c5d275c8abacc (diff)
downloadrockbox-9e2ecee.tar.gz
rockbox-9e2ecee.zip
kyb_helper small 'bug' fix
Change-Id: Ia91a662262497c1a93ce8f26902aab5921ee7185
-rw-r--r--apps/plugins/lib/kbd_helper.c2
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)
const unsigned char *p = layout;
int len = 0;
pbuf = buf;
- while (*p && (pbuf - buf + 8) < bufsz)
+ while (*p && (pbuf - buf + sizeof(unsigned short)) < bufsz)
{
p = rb->utf8decode(p, &pbuf[len+1]);
if (pbuf[len+1] == '\n')