dmitry Thu May 14 08:21:54 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/main php_sprintf.c Log: Fixed wrong return value http://cvs.php.net/viewvc.cgi/php-src/main/php_sprintf.c?r1=1.23.2.1.2.1.2.2&r2=1.23.2.1.2.1.2.3&diff_format=u Index: php-src/main/php_sprintf.c diff -u php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 php-src/main/php_sprintf.c:1.23.2.1.2.1.2.3 --- php-src/main/php_sprintf.c:1.23.2.1.2.1.2.2 Wed Dec 31 11:15:47 2008 +++ php-src/main/php_sprintf.c Thu May 14 08:21:54 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.2 2008/12/31 11:15:47 sebastian Exp $ */ +/* $Id: php_sprintf.c,v 1.23.2.1.2.1.2.3 2009/05/14 08:21:54 dmitry Exp $ */ #include <stdio.h> #include <stdarg.h> @@ -37,9 +37,7 @@ s[0] = '\0'; ret = vsprintf (s, format, args); va_end (args); - if (!ret) - return -1; - return strlen (s); + return (ret < 0) ? -1 : ret; } /*
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php