summaryrefslogtreecommitdiff
path: root/apps/plugins/lua
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r--apps/plugins/lua/rocklib.c7
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);