aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-03 20:29:54 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-03 20:29:54 +0000
commit63f55929b180c91a31fba24cfad9e3d546bb9cc8 (patch)
tree19b05f26baee694bf7c0b0f06b44fa5d77299aea /main/asterisk.c
parent6313d8d59e4323d0d0e7e1c0741e99b6b5afcb00 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@167125 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 2b3832a4d..ccacc6aa6 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 */