First field was truncated.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Dec 2005 00:55:39 +0000 (00:55 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 16 Dec 2005 00:55:39 +0000 (00:55 +0000)
(Don't kill me; this attempted merge didn't work because the paths changed.)

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

funcs/func_cut.c

index f070221..7dc0389 100644 (file)
@@ -120,8 +120,9 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
                int blen = strlen(buffer);
                if (element_count++) {
                        strncat(buffer + blen, ",", buflen - blen - 1);
+                       blen++;
                }
-               strncat(buffer + blen + 1, sortable_keys[count2].key, buflen - blen - 2);
+               strncat(buffer + blen, sortable_keys[count2].key, buflen - blen - 1);
        }
 
        return 0;