aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 5ea5510cf7..872a030755 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 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;