summaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--ext/-test-/printf/printf.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ea5510..872a030 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 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;