Skip to content

Commit

Permalink
Workaround Cppia
Browse files Browse the repository at this point in the history
  • Loading branch information
flashultra committed Dec 22, 2024
1 parent 51eaff1 commit 65f0dd7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions std/haxe/math/bigint/MutableBigInt_.hx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class MutableBigInt_ extends BigInt_ {
Set the value of this big int with an integer of value `value`.
**/
public function setFromInt(value:Int):Void {
#if cppia
if ( m_data == null) return;
#end
ensureCapacity(1, false);
m_data.set(0, value);
m_count = 1;
Expand Down Expand Up @@ -76,6 +79,9 @@ 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

0 comments on commit 65f0dd7

Please sign in to comment.