]> granicus.if.org Git - php/commitdiff
Fix a warning
authorZeev Suraski <zeev@php.net>
Mon, 19 Aug 2002 20:47:42 +0000 (20:47 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 19 Aug 2002 20:47:42 +0000 (20:47 +0000)
ext/ereg/ereg.c
ext/standard/reg.c

index 13e06ba3cc630f3d57256bab0ef2baabab13473c..9b8513e380c99f9c5f600ef632a0ea841858944f 100644 (file)
@@ -342,7 +342,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        while (*walk)
                                if ('\\' == *walk
                                        && '0' <= walk[1] && '9' >= walk[1]
-                                       && walk[1] - '0' <= re.re_nsub
+                                       && walk[1] - '0' <= ((char) re.re_nsub)
                                        && subs[walk[1] - '0'].rm_so > -1
                                        && subs[walk[1] - '0'].rm_eo > -1) {
                                        new_l += subs[walk[1] - '0'].rm_eo
index 13e06ba3cc630f3d57256bab0ef2baabab13473c..9b8513e380c99f9c5f600ef632a0ea841858944f 100644 (file)
@@ -342,7 +342,7 @@ PHPAPI char *php_reg_replace(const char *pattern, const char *replace, const cha
                        while (*walk)
                                if ('\\' == *walk
                                        && '0' <= walk[1] && '9' >= walk[1]
-                                       && walk[1] - '0' <= re.re_nsub
+                                       && walk[1] - '0' <= ((char) re.re_nsub)
                                        && subs[walk[1] - '0'].rm_so > -1
                                        && subs[walk[1] - '0'].rm_eo > -1) {
                                        new_l += subs[walk[1] - '0'].rm_eo