summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/bigdecimal/bigdecimal.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1dabe85..f2d98e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Aug 6 00:40:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.
+
Mon Aug 6 00:39:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index e5f8545..866ce34 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 {