From 64802175e0e1e6bde6ea8dd9b43254c3cf9746ed Mon Sep 17 00:00:00 2001 From: Ilia Ki Date: Fri, 19 Apr 2024 17:46:54 +0700 Subject: [PATCH] fix betterC cbor code --- source/mir/ser/cbor.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/mir/ser/cbor.d b/source/mir/ser/cbor.d index 2218f1c..36d70f4 100644 --- a/source/mir/ser/cbor.d +++ b/source/mir/ser/cbor.d @@ -271,7 +271,12 @@ scope: { auto res = cast(long)num; if (res != num) - throw bigIntConvException.toMutable; + { + version(D_Exceptions) + throw bigIntConvException.toMutable; + else + assert(0, "BigInt is too large for CBOR"); + } putValue(res); }