]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
only process args that exist
authorMatthew Nicholson <mnicholson@digium.com>
Fri, 21 Oct 2011 16:42:33 +0000 (16:42 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Fri, 21 Oct 2011 16:42:33 +0000 (16:42 +0000)
ASTERISK-18395
........

Merged revisions 341809 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@341810 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_lua.c

index db6090a6001f6e84e085b81a58dfb14818aa7eea..0dccfe644d4e2e89536dce6bbcf9e189e6c8fea1 100644 (file)
@@ -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;
        }