diff --git a/src/switch_utils.c b/src/switch_utils.c index 61f712b7c9..8a27a71cc8 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -205,7 +205,7 @@ SWITCH_DECLARE(const char *) switch_stristr(const char *str, const char *instr) while(*a && *b) { if (tolower(*b) == tolower(*a)) { if (++x == score) { - return p; + return b - x + 1; } a++; } else {