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

* bignum.c (biglsh_bang): Fix bignum digits under-run.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-07-08 15:48:09 +00:00
parent 9db6beb0d0
commit be2a1ad45b
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Tue Jul 9 00:46:22 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (biglsh_bang): Fix bignum digits under-run.
Mon Jul 8 23:36:45 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/win32/lib/win32/registry.rb (Error, API): use WCHAR

View file

@ -4425,11 +4425,11 @@ biglsh_bang(BDIGIT *xds, long xn, unsigned long shift)
zds = xds + xn - 1;
xn -= s1 + 1;
num = BIGLO(xds[xn]<<s2);
do {
while (0 < xn) {
*zds-- = num | xds[--xn]>>s3;
num = BIGLO(xds[xn]<<s2);
}
while (xn > 0);
assert(xds <= zds);
*zds = num;
for (i = s1; i > 0; --i)
*zds-- = 0;