diff --git a/src/switch_channel.c b/src/switch_channel.c index 880d7a4b49..b865cdedf0 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1985,12 +1985,12 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel if (*p == '\\') { if (*(p + 1) == '$') { nv = 1; + p++; } else if (*(p + 1) == '\\') { *c++ = *p++; len++; continue; } - p++; } if (*p == '$' && !nv) { diff --git a/src/switch_event.c b/src/switch_event.c index 1c46ebdb6d..272a0db78e 100644 --- a/src/switch_event.c +++ b/src/switch_event.c @@ -1353,12 +1353,12 @@ SWITCH_DECLARE(char *) switch_event_expand_headers(switch_event_t *event, const if (*p == '\\') { if (*(p + 1) == '$') { nv = 1; + p++; } else if (*(p + 1) == '\\') { *c++ = *p++; len++; continue; } - p++; } if (*p == '$' && !nv) {