summaryrefslogtreecommitdiff
path: root/pbx/pbx_lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'pbx/pbx_lua.c')
-rw-r--r--pbx/pbx_lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index db6090a60..0dccfe644 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -669,7 +669,7 @@ static void lua_concat_args(lua_State *L, int start, int nargs) {
int concat = 0;
int i = start + 1;
- if (!lua_isnil(L, start)) {
+ if (start <= nargs && !lua_isnil(L, start)) {
lua_pushvalue(L, start);
concat += 1;
}