From 25bb0d16a9eee5dc02576de7d3be04233ed53b64 Mon Sep 17 00:00:00 2001 From: Rui Hirokawa Date: Tue, 23 Sep 2003 02:43:04 +0000 Subject: fixed win32-build and update e-mail address in mbstring. --- ext/mbstring/php_mbregex.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ext/mbstring/php_mbregex.c') diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 81a07bc752..18687f7477 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -653,7 +653,8 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, int op } } else { /* nomatch */ /* stick that last bit of string on our output */ - smart_str_appendl(&out_buf, pos, (size_t)((UChar *)(string + string_len) - pos)); + if ((UChar *)(string + string_len) > pos) + smart_str_appendl(&out_buf, pos, (size_t)((UChar *)(string + string_len) - pos)); } php_mb_regex_region_free(regs, 0); } @@ -1124,3 +1125,11 @@ PHP_FUNCTION(mb_regex_set_options) #endif /* HAVE_MBREGEX */ +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: fdm=marker + * vim: noet sw=4 ts=4 + */ -- cgit v1.2.1