Skip to content

Commit 9c4a9e7

Browse files
committed
Fix BigInt.fromBigEndian
1 parent 0e4c4ce commit 9c4a9e7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

source/mir/bignum/integer.d

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ struct BigInt(uint size64)
191191
static BigInt fromBigEndian()(scope const(ubyte)[] data, bool sign = false)
192192
@trusted pure @nogc
193193
{
194+
static immutable bigIntOverflowException = new Exception("BigInt!" ~ size64.stringof ~ ".fromBigEndian: data overflow");
194195
BigInt ret = void;
195196
if (!ret.copyFromBigEndian(data, sign))
196-
static immutable bigIntOverflowException = new Exception("BigInt!" ~ size64.stringof ~ ".fromBigEndian: data overflow");
197+
throw bigIntOverflowException;
197198
return ret;
198199
}
199200

source/mir/stdio.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ mixin template FileMembers()
211211
{
212212
if (__ctfe)
213213
return this;
214-
import mir.format: print;
215214
this.put(endl);
216215
this.flush;
217216
return this;

0 commit comments

Comments
 (0)