summaryrefslogtreecommitdiff
path: root/Zend/zend_sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_sprintf.c')
-rw-r--r--Zend/zend_sprintf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zend/zend_sprintf.c b/Zend/zend_sprintf.c
index cb63e20975..37d876d423 100644
--- a/Zend/zend_sprintf.c
+++ b/Zend/zend_sprintf.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Zend Engine |
+----------------------------------------------------------------------+
- | Copyright (c) 1998-2015 Zend Technologies Ltd. (http://www.zend.com) |
+ | Copyright (c) 1998-2016 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,13 +30,14 @@
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...)
{
+ int len;
va_list args;
va_start(args, format);
- vsprintf(buffer, format, args);
+ len = vsprintf(buffer, format, args);
va_end(args);
- return strlen(buffer);
+ return len;
}
#endif