* 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
This commit is contained in:
parent
fa9b5bf223
commit
3f9e0e43c3
@ -1,3 +1,8 @@
|
|||||||
|
Wed Apr 10 17:39:13 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* ext/bigdecimal/bigdecimal.c (VpCtoV): Initialize a local variable
|
||||||
|
even when overflow.
|
||||||
|
|
||||||
Wed Apr 10 12:32:37 2013 Tanaka Akira <akr@fsij.org>
|
Wed Apr 10 12:32:37 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* bignum.c (rb_ll2big): Don't overflow on signed integer negation.
|
* bignum.c (rb_ll2big): Don't overflow on signed integer negation.
|
||||||
|
@ -5270,8 +5270,10 @@ VpCtoV(Real *a, const char *int_chr, size_t ni, const char *frac, size_t nf, con
|
|||||||
++me;
|
++me;
|
||||||
}
|
}
|
||||||
while (i < 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;
|
goto exp_overflow;
|
||||||
|
}
|
||||||
es = e * (SIGNED_VALUE)BASE_FIG;
|
es = e * (SIGNED_VALUE)BASE_FIG;
|
||||||
if (MUL_OVERFLOW_SIGNED_VALUE_P(e, 10) ||
|
if (MUL_OVERFLOW_SIGNED_VALUE_P(e, 10) ||
|
||||||
SIGNED_VALUE_MAX - (exp_chr[i] - '0') < e * 10)
|
SIGNED_VALUE_MAX - (exp_chr[i] - '0') < e * 10)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user