diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-10-24 11:09:17 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-10-24 11:16:25 -0400 |
commit | 20b98f6fd0e5916bffe9561ebd324acdfbabf61a (patch) | |
tree | c1a83038efbcbc68b55659100359061ca094c445 /apps/plugins/lua | |
parent | df4cb9bafc66c3d88945b70389e0cb87cbcecf15 (diff) |
Lua fix create_numbered_filename
I didn't realize that some devices used the *num variable
this fixes that oversight
Change-Id: I2ecd6f475bebdd6ce745b360be3762a069bfc2b1
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r-- | apps/plugins/lua/rocklib.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |