aboutsummaryrefslogtreecommitdiffstats
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-10 08:39:53 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-10 08:39:53 +0000
commit3f9e0e43c3a8f5db37f671ad3f957e4fddba0bcb (patch)
treefbbf057330d27925015a13ffeb7fa57ea91b3721 /ext/bigdecimal
parentfa9b5bf223c6dc81ae3f128bfb02a7f69cb7f3b6 (diff)
downloadruby-3f9e0e43c3a8f5db37f671ad3f957e4fddba0bcb.tar.gz
* ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variable
even when overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index d6cc409eac..f08dce40a4 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -5270,8 +5270,10 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
++me;
}
while (i < me) {
- if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG))
+ if (MUL_OVERFLOW_SIGNED_VALUE_P(e, (SIGNED_VALUE)BASE_FIG)) {
+ es = e;
goto exp_overflow;
+ }
es = e * (SIGNED_VALUE)BASE_FIG;
if (MUL_OVERFLOW_SIGNED_VALUE_P(e, 10) ||
SIGNED_VALUE_MAX - (exp_chr[i] - '0') < e * 10)