1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size

of the digit array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mrkn 2013-11-21 12:42:01 +00:00
parent ff3e585014
commit b6f664686e
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Thu Nov 21 21:40:00 2013 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (VpAlloc): Fix the expr to adjust the size
of the digit array.
Thu Nov 21 21:36:00 2013 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix the precision of

View file

@ -3816,7 +3816,9 @@ VpAlloc(size_t mx, const char *szVal)
size_t mf = VpGetPrecLimit();
VALUE buf;
mx = (mx + BASE_FIG - 1) / BASE_FIG + 1; /* Determine allocation unit. */
mx = (mx + BASE_FIG - 1) / BASE_FIG; /* Determine allocation unit. */
if (mx == 0) ++mx;
if (szVal) {
while (ISSPACE(*szVal)) szVal++;
if (*szVal != '#') {