Fixed wrong return value

This commit is contained in:
Dmitry Stogov 2009-05-14 08:21:54 +00:00
parent 464cfab1b1
commit 2f8ca07d18

View File

@ -37,9 +37,7 @@ php_sprintf (char*s, const char* format, ...)
s[0] = '\0';
ret = vsprintf (s, format, args);
va_end (args);
if (!ret)
return -1;
return strlen (s);
return (ret < 0) ? -1 : ret;
}
/*