From 20b98f6fd0e5916bffe9561ebd324acdfbabf61a Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Wed, 24 Oct 2018 11:09:17 -0400 Subject: Lua fix create_numbered_filename I didn't realize that some devices used the *num variable this fixes that oversight Change-Id: I2ecd6f475bebdd6ce745b360be3762a069bfc2b1 --- apps/plugins/lua/rocklib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/plugins/lua/rocklib.c') diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 64394b8728..3f85da97a7 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c @@ -383,9 +383,12 @@ RB_WRAP(create_numbered_filename) const char * path = luaL_checkstring(L, 1); const char * prefix = luaL_checkstring(L, 2); const char * suffix = luaL_checkstring(L, 3); - int numberlen = luaL_optint(L, 4, -1); + int numberlen = luaL_checkint(L, 4); + int num = luaL_optint(L, 5, -1); + (void) num; - if(rb->create_numbered_filename(buffer, path, prefix, suffix, numberlen)) + if(rb->create_numbered_filename(buffer, path, prefix, suffix, numberlen + IF_CNFN_NUM_(, &num))) { luaL_addstring(&b, buffer); luaL_pushresult(&b); -- cgit v1.2.3