From 55533c4d36748d30a1ab5d49c35abae19077c7fe Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 25 Oct 2018 06:28:23 -0400 Subject: Lua Fix kbd_input While luaL_addstring() works perfectly fine for the final buffer once Lual_pushresult() is called kbd_input doesn't display a previous input properly since the buffer hasn't been finalized yet Change-Id: Ic50acaa8b7b17077dec8750dd2b6382624e8a549 --- apps/plugins/lua/rocklib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/plugins/lua') diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 1b928c229c..80124d2165 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -131,7 +131,7 @@ RB_WRAP(kbd_input) char *buffer = luaL_prepbuffer(&b); if(input != NULL) - luaL_addstring(&b, input); + rb->strlcpy(buffer, input, LUAL_BUFFERSIZE); else buffer[0] = '\0'; -- cgit v1.2.3