Skip to content

Commit

Permalink
Fix Cppia II
Browse files Browse the repository at this point in the history
  • Loading branch information
flashultra committed Dec 22, 2024
1 parent 65f0dd7 commit ab17d83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/haxe/math/bigint/MutableBigInt_.hx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class MutableBigInt_ extends BigInt_ {
Set the value of this big int with an integer of value `value`.
**/
public function setFromInt(value:Int):Void {
ensureCapacity(1, false);
#if cppia
if ( m_data == null) return;
#end
ensureCapacity(1, false);
m_data.set(0, value);
m_count = 1;
}
Expand Down Expand Up @@ -79,9 +79,6 @@ class MutableBigInt_ extends BigInt_ {
if ((value == null) || (value.length < 1)) {
throw new BigIntException(BigIntError.INVALID_ARGUMENT);
}
#if cppia
if ( m_data == null) return;
#end
var negate = value.charCodeAt(0) == 0x2d;
var index = negate ? 1 : 0;
if (value.length <= index) {
Expand Down Expand Up @@ -142,6 +139,9 @@ class MutableBigInt_ extends BigInt_ {
}
var neg = value.get(length - 1) >>> 31;
ensureCapacity(length + neg, false);
#if cppia
if ( m_data == null) return;
#end
m_data.set(length + neg - 1, 0);
MultiwordArithmetic.copy(m_data, value, length);
m_count = length + neg;
Expand Down

0 comments on commit ab17d83

Please sign in to comment.