From 334a89f7546ed7689e986d465833e84cbdc2f2d0 Mon Sep 17 00:00:00 2001
From: Jeff Peeler <jpeeler@digium.com>
Date: Sat, 3 Jan 2009 20:29:54 +0000
Subject: [PATCH] When parsing environment variable ASTERISK_PROMPT, make sure
 to proceed to the next character when a non format specifier is used (no %).
 Otherwise, the while loop looking for the null byte will never exit.

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

diff --git a/main/asterisk.c b/main/asterisk.c
index 2b3832a4d1..ccacc6aa6d 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -2235,10 +2235,10 @@ static char *cli_prompt(EditLine *editline)
 					t--;
 					break;
 				}
-				t++;
 			} else {
 				ast_str_append(&prompt, 0, "%c", *t);
 			}
+			t++;
 		}
 		if (color_used) {
 			/* Force colors back to normal at end */
-- 
GitLab