diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-20 05:16:13 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-09-20 05:16:13 +0000 |
commit | 035917adc127083ac851394e56ba3636b58e4823 (patch) | |
tree | 84747ec54448328357573e059828d2772bffb332 | |
parent | 831fe26dec26146d0d7c25194e8cedce39b0db0e (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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/-test-/printf/printf.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Sep 20 14:14:32 2013 Tanaka Akira <akr@fsij.org> + + * ext/-test-/printf/printf.c (printf_test_call): Fix an end of buffer + argument. + Thu Sep 19 16:59:02 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (lambda): adjust position to the beginning of the block. diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c index 53aad85f19..fd60b0f593 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; |