From 7298d3feb34e0edb07ca4718a8c25f51227d1af0 Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Tue, 28 Mar 2006 18:13:53 +0000
Subject: [PATCH] Merged revisions 15658 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15658 | russell | 2006-03-28 13:09:05 -0500 (Tue, 28 Mar 2006) | 2 lines

fix the order in which for loops are expanded (issue #6810)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 pbx/pbx_ael.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 4b758a61b6..0ab5886799 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -778,8 +778,8 @@ static int __build_step(const char *what, const char *name, const char *filename
 				*label = NULL;
 				/* Remember where the whileblock starts */
 				forblock = (*pos);
-				build_step("for", margs, filename, lineno, con, exten, pos, fields->next->next->data, &fillin, label);
 				build_step("for", margs, filename, lineno, con, exten, pos, c, &fillin, label);
+				build_step("for", margs, filename, lineno, con, exten, pos, fields->next->next->data, &fillin, label);
 				/* Close the loop */
 				app = "Goto";
 				snprintf(margs, mlen, "%d", forstart);
-- 
GitLab