mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
BigInteger.java (setShiftRight): Only do negative shift if count != 0.
2001-01-16 Hans Boehm <hans_boehm@hp.com> * java/math/BigInteger.java (setShiftRight): Only do negative shift if count != 0. From-SVN: r39080
This commit is contained in:
committed by
Bryce McKinlay
parent
930f669025
commit
c7fb0b9218
@@ -1401,11 +1401,13 @@ public class BigInteger extends Number implements Comparable
|
||||
realloc(d_len);
|
||||
if (count == 0)
|
||||
System.arraycopy(x.words, word_count, words, 0, d_len);
|
||||
else
|
||||
MPN.rshift(words, x.words, word_count, d_len, count);
|
||||
else
|
||||
{
|
||||
MPN.rshift(words, x.words, word_count, d_len, count);
|
||||
if (neg)
|
||||
words[d_len-1] |= -1 << (32 - count);
|
||||
}
|
||||
ival = d_len;
|
||||
if (neg)
|
||||
words[ival-1] |= -1 << (32 - count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user