From 03abd758b54928003d528c29519af4e1f6dec869 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Tue, 22 Oct 2019 13:35:08 -0400 Subject: [PATCH] Begin to handle tommath return values --- runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index 451719a8..9ad013d9 100644 --- a/runtime.c +++ b/runtime.c @@ -1522,7 +1522,8 @@ int Cyc_bignum_cmp(bn_cmp_type type, object x, int tx, object y, int ty) if (tx == bignum_tag && ty == bignum_tag) { cmp = mp_cmp(&bignum_value(x), &bignum_value(y)); } else if (tx == bignum_tag && ty == -1) { \ - mp_init(&tmp); + // JAE TODO: make a macro out of this, and use for other BN calls + mp_init(&tmp) ? fprintf(stderr, "Error initializing bignum"), exit(1) : 0; Cyc_int2bignum(obj_obj2int(y), &tmp); cmp = mp_cmp(&bignum_value(x), &tmp); mp_clear(&tmp);