--- a/LargeInteger.st Fri May 14 17:37:09 1999 +0200
+++ b/LargeInteger.st Fri May 14 17:50:10 1999 +0200
@@ -2933,13 +2933,14 @@
].
"/ knowing that len2 is <= len1
%{
+
OBJ _digitByteArray = __INST(digitByteArray);
if (__isByteArray(_digitByteArray)
&& __isByteArray(otherDigitByteArray)) {
int _len1 = __intVal(len1),
_len2 = __intVal(len2);
- unsigned char *_myDigits, *_otherDigits, *_newDigits;
+ unsigned char *_myDigits, *_otherDigits;
int _index = 1, _borrow = 0;
int _diff;
int anyBitNonZero = 0;
@@ -2954,12 +2955,13 @@
_borrow = 0;
} else {
_borrow = -1;
- diff += 0x100;
+ _diff += 0x100;
}
_myDigits[_index - 1] = _diff;
anyBitNonZero |= (_diff & 0xFF);
_index++;
}
+
while (_index <= _len1) {
_diff = _borrow + _myDigits[_index - 1];
if (_diff >= 0) {
@@ -2974,7 +2976,7 @@
break;
}
_borrow = -1;
- diff += 0x100;
+ _diff += 0x100;
_myDigits[_index - 1] = _diff;
anyBitNonZero |= (_diff & 0xFF);
@@ -3249,5 +3251,5 @@
!LargeInteger class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.96 1999-05-14 15:37:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.97 1999-05-14 15:50:10 cg Exp $'
! !