summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index b41ab9c..3642e21 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -1174,6 +1174,7 @@ ruby__sfvwrite(register rb_printf_buffer *fp, register struct __suio *uio)
len -= n;
}
fp->_p = (unsigned char *)buf;
+ rb_str_set_len(result, buf - RSTRING_PTR(result));
return 0;
}