aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/callerid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/callerid.c b/main/callerid.c
index d446ecbb8..bf4bca429 100644
--- a/main/callerid.c
+++ b/main/callerid.c
@@ -971,7 +971,7 @@ int ast_callerid_parse(char *instr, char **name, char **location)
char *ns, *ne, *ls, *le;
/* Try "name" <location> format or name <location> format */
- if ((ls = strchr(instr, '<')) && (le = strchr(ls, '>'))) {
+ if ((ls = strrchr(instr, '<')) && (le = strrchr(ls, '>'))) {
*ls = *le = '\0'; /* location found, trim off the brackets */
*location = ls + 1; /* and this is the result */
if ((ns = strchr(instr, '"')) && (ne = strchr(ns + 1, '"'))) {