]> granicus.if.org Git - php/commitdiff
MFH: Fix compile with c++ (bug #26519)
authorfoobar <sniper@php.net>
Thu, 4 Dec 2003 12:45:32 +0000 (12:45 +0000)
committerfoobar <sniper@php.net>
Thu, 4 Dec 2003 12:45:32 +0000 (12:45 +0000)
ext/standard/php_string.h

index b2d146c056212c61d46ec6aa3499c04c606c0b7c..51f8fdc782a123630c4db66080e6fd35fe50bba1 100644 (file)
@@ -139,7 +139,7 @@ php_memnstr(char *haystack, char *needle, int needle_len, char *end)
        end -= needle_len;
 
        while (p <= end) {
-               if ((p = memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
+               if ((p = (char *) memchr(p, *needle, (end-p+1))) && ne == p[needle_len-1]) {
                        if (!memcmp(needle, p, needle_len-1)) {
                                return p;
                        }