From 65f0dd723e69cf9ae50ffa500c47b10d56ebd54b Mon Sep 17 00:00:00 2001 From: flashultra Date: Sun, 22 Dec 2024 11:43:50 +0200 Subject: [PATCH] Workaround Cppia --- std/haxe/math/bigint/MutableBigInt_.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/std/haxe/math/bigint/MutableBigInt_.hx b/std/haxe/math/bigint/MutableBigInt_.hx index 056ce354d1b..2435c890f38 100644 --- a/std/haxe/math/bigint/MutableBigInt_.hx +++ b/std/haxe/math/bigint/MutableBigInt_.hx @@ -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; @@ -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) {