hirokawa Mon Sep 22 22:54:28 2003 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/mbstring php_mbregex.c
Log:
removed unnessesary null byte (patched by komura).
Index: php-src/ext/mbstring/php_mbregex.c
diff -u php-src/ext/mbstring/php_mbregex.c:1.18.2.8
php-src/ext/mbstring/php_mbregex.c:1.18.2.9
--- php-src/ext/mbstring/php_mbregex.c:1.18.2.8 Thu May 1 17:08:47 2003
+++ php-src/ext/mbstring/php_mbregex.c Mon Sep 22 22:54:28 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mbregex.c,v 1.18.2.8 2003/05/01 21:08:47 iliaa Exp $ */
+/* $Id: php_mbregex.c,v 1.18.2.9 2003/09/23 02:54:28 hirokawa Exp $ */
#ifdef HAVE_CONFIG_H
@@ -557,7 +557,12 @@
}
} else { /* nomatch */
/* stick that last bit of string on our output */
- _php_mb_regex_strbuf_ncat(&outdev, (const unsigned char
*)&string[pos], string_len - pos);
+ int l = string_len - pos;
+ if (l > 0) {
+ _php_mb_regex_strbuf_ncat(&outdev, (const unsigned
char *)&string[pos], l);
+ } else {
+ outdev.pos += l;
+ }
}
}
@@ -1083,3 +1088,12 @@
/* }}} */
#endif /* HAVE_MBREGEX */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: noet sw=4 ts=4
+ */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php