summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vsnprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/vsnprintf.c')
-rw-r--r--lib/libc/stdio/vsnprintf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/stdio/vsnprintf.c b/lib/libc/stdio/vsnprintf.c
index cb0e15a..18b5e5c 100644
--- a/lib/libc/stdio/vsnprintf.c
+++ b/lib/libc/stdio/vsnprintf.c
@@ -54,6 +54,7 @@ vsnprintf(str, n, fmt, ap)
size_t on;
int ret;
FILE f;
+ struct __sFILEX ext;
on = n;
if (n != 0)
@@ -64,6 +65,8 @@ vsnprintf(str, n, fmt, ap)
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = n;
+ f._extra = &ext;
+ INITEXTRA(&f);
ret = __vfprintf(&f, fmt, ap);
if (on > 0)
*f._p = '\0';
OpenPOWER on IntegriCloud