]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix return val in switch_stristr
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 23 Oct 2007 02:59:46 +0000 (02:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 23 Oct 2007 02:59:46 +0000 (02:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6024 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_utils.c

index 61f712b7c92b755b83864d2b4c732bc61656cafe..8a27a71cc8c97d7601f1717a201b8fad9b0e6ccd 100644 (file)
@@ -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 {