Hi Derick, in php-src/main/php_sprintf.c PHPAPI int php_sprintf (char*s, const char* format, ...) { va_list args; char *ret; //ret should be of type integer as vsprintf returns int rather than char*
va_start (args, format); s[0] = '\0'; ret = vsprintf (s, format, args); va_end (args); if (!ret) //This check should be if(ret < 0) as ret will have the number of characters printed to s //If an output error is encountered, a negative value is returned. return -1; return strlen (s); } ret should be of type integer as vsprintf returns int rather than char*. if (!ret) should be if(ret < 0) With regards Kamesh Jayachandran -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php