}
} 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;
+ }
}
}
/* }}} */
#endif /* HAVE_MBREGEX */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: noet sw=4 ts=4
+ */