diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-27 08:05:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-04-27 08:05:21 +0000 |
commit | ea2cb282aeba0457aa775d5dbfa1da6810fafa45 (patch) | |
tree | 5bf06be14447d65bfef7f68b019268ba8a4d683c /numeric.c | |
parent | 5d2069cd566a2e1c616a91e4bda82f567d857498 (diff) | |
download | ruby-ea2cb282aeba0457aa775d5dbfa1da6810fafa45.tar.gz |
* numeric.c (int_pow): bugfix of overflow detection.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2283,7 +2283,7 @@ int_pow(long x, unsigned long y) } { long xz = x * z; - if (xz < z || xz < x || !POSFIXABLE(xz)) { + if (!POSFIXABLE(xz) || xz / x != z) { goto bignum; } z = xz; |