From 13527efd592483678b0738a2c7d6fb82c3f33150 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 5 Aug 2012 15:40:56 +0000 Subject: [PATCH] bigdecimal.c: fix format specifier * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/bigdecimal/bigdecimal.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1dabe8517e..f2d98e6c73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 6 00:40:54 2012 Nobuyoshi Nakada + + * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier. + Mon Aug 6 00:39:24 2012 Nobuyoshi Nakada * include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c index e5f8545991..866ce345fc 100644 --- a/ext/bigdecimal/bigdecimal.c +++ b/ext/bigdecimal/bigdecimal.c @@ -2704,7 +2704,7 @@ get_vp_value: expo = VpExponent10(vx); if (expo < 0 || expo >= 3) { char buf[16]; - snprintf(buf, 16, "1E%ld", -expo); + snprintf(buf, 16, "1E%"PRIdVALUE, -expo); x = BigDecimal_mult2(x, ToValue(VpCreateRbObject(1, buf)), vn); } else {