File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,10 @@ class MutableBigInt_ extends BigInt_ {
48
48
Set the value of this big int with an integer of value `value`.
49
49
**/
50
50
public function setFromInt (value : Int ): Void {
51
+ ensureCapacity (1 , false );
51
52
#if cppia
52
53
if ( m_data == null ) return ;
53
54
#end
54
- ensureCapacity (1 , false );
55
55
m_data .set (0 , value );
56
56
m_count = 1 ;
57
57
}
@@ -79,9 +79,6 @@ class MutableBigInt_ extends BigInt_ {
79
79
if ((value == null ) || (value .length < 1 )) {
80
80
throw new BigIntException (BigIntError .INVALID_ARGUMENT );
81
81
}
82
- #if cppia
83
- if ( m_data == null ) return ;
84
- #end
85
82
var negate = value .charCodeAt (0 ) == 0x2d ;
86
83
var index = negate ? 1 : 0 ;
87
84
if (value .length <= index ) {
@@ -142,6 +139,9 @@ class MutableBigInt_ extends BigInt_ {
142
139
}
143
140
var neg = value .get (length - 1 ) >>> 31 ;
144
141
ensureCapacity (length + neg , false );
142
+ #if cppia
143
+ if ( m_data == null ) return ;
144
+ #end
145
145
m_data .set (length + neg - 1 , 0 );
146
146
MultiwordArithmetic .copy (m_data , value , length );
147
147
m_count = length + neg ;
You can’t perform that action at this time.
0 commit comments