lbarnaud Mon Nov 24 19:21:20 2008 UTC
Modified files:
/php-src/ext/standard string.c
Log:
Fixed bug #44075 (strtok misbehaving on unicode string)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.684&r2=1.685&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.684 php-src/ext/standard/string.c:1.685
--- php-src/ext/standard/string.c:1.684 Fri Nov 21 19:14:46 2008
+++ php-src/ext/standard/string.c Mon Nov 24 19:21:20 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.684 2008/11/21 19:14:46 felipe Exp $ */
+/* $Id: string.c,v 1.685 2008/11/24 19:21:20 lbarnaud Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -1569,8 +1569,11 @@
end = i;
if (end - start) {
+ RETVAL_UNICODEL(u_p + start, end - start, 1);
+ /* skip matched token */
+ U16_FWD_1(u_p, end, rem_len);
BG(strtok_last) = u_p + end;
- RETURN_UNICODEL(u_p + start, end - start, 1);
+ return;
} else {
BG(strtok_last) = NULL;
RETURN_FALSE;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php