dmitry          Thu May 14 08:22:10 2009 UTC

  Modified files:              
    /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.28&r2=1.29&diff_format=u
Index: php-src/main/php_sprintf.c
diff -u php-src/main/php_sprintf.c:1.28 php-src/main/php_sprintf.c:1.29
--- php-src/main/php_sprintf.c:1.28     Tue Mar 10 23:39:53 2009
+++ php-src/main/php_sprintf.c  Thu May 14 08:22:09 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_sprintf.c,v 1.28 2009/03/10 23:39:53 helly Exp $ */
+/* $Id: php_sprintf.c,v 1.29 2009/05/14 08:22:09 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

Reply via email to