mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
Fixed wrong return value
This commit is contained in:
parent
464cfab1b1
commit
2f8ca07d18
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user