summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-20 05:16:13 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-20 05:16:13 +0000
commit035917adc127083ac851394e56ba3636b58e4823 (patch)
tree84747ec54448328357573e059828d2772bffb332 /ext
parent831fe26dec26146d0d7c25194e8cedce39b0db0e (diff)
* ext/-test-/printf/printf.c (printf_test_call): Fix an end of buffer
argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/printf/printf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c
index 53aad85..fd60b0f 100644
--- a/ext/-test-/printf/printf.c
+++ b/ext/-test-/printf/printf.c
@@ -79,7 +79,7 @@ printf_test_call(int argc, VALUE *argv, VALUE self)
if (!NIL_P(v = rb_hash_aref(opt, ID2SYM(rb_intern("prec"))))) {
*p++ = '.';
if (FIXNUM_P(v))
- p = utoa(p, p + sizeof(format), NUM2UINT(v));
+ p = utoa(p, format + sizeof(format), NUM2UINT(v));
}
}
*p++ = cnv;